repull 0.2.42 → 0.2.43
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 +2 -2
- data/lib/repull/api/listings_api.rb +146 -6
- data/lib/repull/api/reservations_api.rb +93 -0
- data/lib/repull/models/account_disconnected_payload.rb +3 -2
- data/lib/repull/models/get_listing_markups200_response.rb +15 -4
- data/lib/repull/models/get_listing_markups200_response_vrbo_inner.rb +181 -0
- data/lib/repull/models/get_reservation_summary200_response.rb +353 -0
- data/lib/repull/models/get_reservation_summary200_response_totals_inner.rb +478 -0
- data/lib/repull/models/get_vrbo_publish_job200_response.rb +199 -0
- data/lib/repull/models/get_vrbo_publish_job200_response_job.rb +300 -0
- data/lib/repull/models/get_vrbo_publish_job200_response_job_rejected_photos_inner.rb +157 -0
- data/lib/repull/models/map_connect_booking_rooms_response.rb +44 -5
- data/lib/repull/models/message.rb +29 -5
- data/lib/repull/models/message_actor.rb +159 -0
- data/lib/repull/models/message_reaction.rb +178 -0
- data/lib/repull/models/publish_listing_to_vrbo_request.rb +158 -0
- data/lib/repull/models/reservation.rb +12 -1
- data/lib/repull/models/reservation_message_reaction_event.rb +281 -0
- data/lib/repull/models/reservation_message_reaction_payload.rb +225 -0
- data/lib/repull/models/reservation_message_reaction_payload_reaction.rb +175 -0
- data/lib/repull/models/reservation_message_read_event.rb +281 -0
- data/lib/repull/models/reservation_message_read_payload.rb +227 -0
- data/lib/repull/models/reservation_message_updated_payload.rb +1 -1
- data/lib/repull/models/set_listing_markup_request.rb +16 -6
- data/lib/repull/models/update_airbnb_message_request.rb +1 -1
- data/lib/repull/models/webhook_event.rb +4 -0
- data/lib/repull/models/webhook_event_type.rb +3 -1
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +14 -0
- data/openapi/v1.json +1055 -14
- data/scripts/regen.sh +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4609d028c32c5023fb322eb90df0d3acb672dd89aad815a10a2949dd5850a912
|
|
4
|
+
data.tar.gz: c3b6d926c57b5ef411e2b912bb49fb4fd055c262cde0f6670f987e0c4695be9d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 527d2639d41e52875248c0d3f0084dbcd2e8ed79bc98cf3d934071ce2acc092a4f52896c07637f0fab91dfceaa9e9ae30cec0b81b465bbb17e9559e3c1e26df5
|
|
7
|
+
data.tar.gz: ea745952e5a682b8a54bfe3e08955621028828413d9da35e74ace74a8004167ea4dfb0ed5d7e85de7391da3a58ac347af08a6d07b364d87684e9fd97dc9a827c
|
|
@@ -3973,7 +3973,7 @@ module Repull
|
|
|
3973
3973
|
end
|
|
3974
3974
|
|
|
3975
3975
|
# Edit / react to / mark an Airbnb message
|
|
3976
|
-
# Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The `action` discriminator selects the operation: - `edit` — replace message text (requires `message`). - `unsend` — retract the message. - `read` — mark the message as read. - `react` — add a reaction (requires `reaction`). Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3976
|
+
# Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The `action` discriminator selects the operation: - `edit` — replace message text (requires `message`). - `unsend` — retract the message. - `read` — mark the message as read on Airbnb, as the host. Airbnb accepts it (it has been used in production); whether and when the guest sees it as read is up to Airbnb and is not confirmed yet. Your side's read state on each guest message is `hostReadAt` on `GET /v1/conversations/{id}/messages`. - `react` — add a reaction (requires `reaction`, e.g. `\"👍\"`). Airbnb decides which reactions it accepts: a refusal is `422 reaction_not_supported` naming the field, with Airbnb's reason. Removing a reaction is not available yet. Reactions and read receipts from the guest's side arrive on each message (`reactions`, `readAt`) and as the `reservation.message.reaction` and `reservation.message.read` webhooks. Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3977
3977
|
# @param thread_id [String] Airbnb thread id.
|
|
3978
3978
|
# @param message_id [String] Airbnb message id within the thread.
|
|
3979
3979
|
# @param update_airbnb_message_request [UpdateAirbnbMessageRequest]
|
|
@@ -3985,7 +3985,7 @@ module Repull
|
|
|
3985
3985
|
end
|
|
3986
3986
|
|
|
3987
3987
|
# Edit / react to / mark an Airbnb message
|
|
3988
|
-
# Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The `action` discriminator selects the operation: - `edit` — replace message text (requires `message`). - `unsend` — retract the message. - `read` — mark the message as read. - `react` — add a reaction (requires `reaction`). Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3988
|
+
# Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The `action` discriminator selects the operation: - `edit` — replace message text (requires `message`). - `unsend` — retract the message. - `read` — mark the message as read on Airbnb, as the host. Airbnb accepts it (it has been used in production); whether and when the guest sees it as read is up to Airbnb and is not confirmed yet. Your side's read state on each guest message is `hostReadAt` on `GET /v1/conversations/{id}/messages`. - `react` — add a reaction (requires `reaction`, e.g. `\"👍\"`). Airbnb decides which reactions it accepts: a refusal is `422 reaction_not_supported` naming the field, with Airbnb's reason. Removing a reaction is not available yet. Reactions and read receipts from the guest's side arrive on each message (`reactions`, `readAt`) and as the `reservation.message.reaction` and `reservation.message.read` webhooks. Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3989
3989
|
# @param thread_id [String] Airbnb thread id.
|
|
3990
3990
|
# @param message_id [String] Airbnb message id within the thread.
|
|
3991
3991
|
# @param update_airbnb_message_request [UpdateAirbnbMessageRequest]
|
|
@@ -501,7 +501,7 @@ module Repull
|
|
|
501
501
|
end
|
|
502
502
|
|
|
503
503
|
# Get a listing's channel markups
|
|
504
|
-
# The markup each channel adds to this listing's price. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one.
|
|
504
|
+
# The markup each channel adds to this listing's price. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). - **Vrbo** — one markup per connected **Vrbo account**, shared by every listing linked on it (`listingIds` names them). Prices reach Vrbo through its calendar queue. Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one.
|
|
505
505
|
# @param id [String] Repull listing id.
|
|
506
506
|
# @param [Hash] opts the optional parameters
|
|
507
507
|
# @return [GetListingMarkups200Response]
|
|
@@ -511,7 +511,7 @@ module Repull
|
|
|
511
511
|
end
|
|
512
512
|
|
|
513
513
|
# Get a listing's channel markups
|
|
514
|
-
# The markup each channel adds to this listing's price. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one.
|
|
514
|
+
# The markup each channel adds to this listing's price. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). - **Vrbo** — one markup per connected **Vrbo account**, shared by every listing linked on it (`listingIds` names them). Prices reach Vrbo through its calendar queue. Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one.
|
|
515
515
|
# @param id [String] Repull listing id.
|
|
516
516
|
# @param [Hash] opts the optional parameters
|
|
517
517
|
# @return [Array<(GetListingMarkups200Response, Integer, Hash)>] GetListingMarkups200Response data, response status code and response headers
|
|
@@ -626,6 +626,76 @@ module Repull
|
|
|
626
626
|
return data, status_code, headers
|
|
627
627
|
end
|
|
628
628
|
|
|
629
|
+
# Progress of a Vrbo listing creation
|
|
630
|
+
# Each step Vrbo has finished, Vrbo's reason when it failed, the new Vrbo listing number once published, and photos Vrbo's review refused. When Vrbo has published the listing, this read links the new unit to the listing with calendar sync on and queues the whole calendar — poll until `linked` is true. A job is remembered while it runs and for a while after; an unknown job is `404` (publish again to resume).
|
|
631
|
+
# @param id [Integer] Repull listing id
|
|
632
|
+
# @param job_id [String] `job.jobId` from the POST.
|
|
633
|
+
# @param [Hash] opts the optional parameters
|
|
634
|
+
# @return [GetVrboPublishJob200Response]
|
|
635
|
+
def get_vrbo_publish_job(id, job_id, opts = {})
|
|
636
|
+
data, _status_code, _headers = get_vrbo_publish_job_with_http_info(id, job_id, opts)
|
|
637
|
+
data
|
|
638
|
+
end
|
|
639
|
+
|
|
640
|
+
# Progress of a Vrbo listing creation
|
|
641
|
+
# Each step Vrbo has finished, Vrbo's reason when it failed, the new Vrbo listing number once published, and photos Vrbo's review refused. When Vrbo has published the listing, this read links the new unit to the listing with calendar sync on and queues the whole calendar — poll until `linked` is true. A job is remembered while it runs and for a while after; an unknown job is `404` (publish again to resume).
|
|
642
|
+
# @param id [Integer] Repull listing id
|
|
643
|
+
# @param job_id [String] `job.jobId` from the POST.
|
|
644
|
+
# @param [Hash] opts the optional parameters
|
|
645
|
+
# @return [Array<(GetVrboPublishJob200Response, Integer, Hash)>] GetVrboPublishJob200Response data, response status code and response headers
|
|
646
|
+
def get_vrbo_publish_job_with_http_info(id, job_id, opts = {})
|
|
647
|
+
if @api_client.config.debugging
|
|
648
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.get_vrbo_publish_job ...'
|
|
649
|
+
end
|
|
650
|
+
# verify the required parameter 'id' is set
|
|
651
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
652
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.get_vrbo_publish_job"
|
|
653
|
+
end
|
|
654
|
+
# verify the required parameter 'job_id' is set
|
|
655
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
|
656
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling ListingsApi.get_vrbo_publish_job"
|
|
657
|
+
end
|
|
658
|
+
# resource path
|
|
659
|
+
local_var_path = '/v1/listings/{id}/publish/vrbo'.sub('{id}', CGI.escape(id.to_s))
|
|
660
|
+
|
|
661
|
+
# query parameters
|
|
662
|
+
query_params = opts[:query_params] || {}
|
|
663
|
+
query_params[:'jobId'] = job_id
|
|
664
|
+
|
|
665
|
+
# header parameters
|
|
666
|
+
header_params = opts[:header_params] || {}
|
|
667
|
+
# HTTP header 'Accept' (if needed)
|
|
668
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
669
|
+
|
|
670
|
+
# form parameters
|
|
671
|
+
form_params = opts[:form_params] || {}
|
|
672
|
+
|
|
673
|
+
# http body (model)
|
|
674
|
+
post_body = opts[:debug_body]
|
|
675
|
+
|
|
676
|
+
# return_type
|
|
677
|
+
return_type = opts[:debug_return_type] || 'GetVrboPublishJob200Response'
|
|
678
|
+
|
|
679
|
+
# auth_names
|
|
680
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
681
|
+
|
|
682
|
+
new_options = opts.merge(
|
|
683
|
+
:operation => :"ListingsApi.get_vrbo_publish_job",
|
|
684
|
+
:header_params => header_params,
|
|
685
|
+
:query_params => query_params,
|
|
686
|
+
:form_params => form_params,
|
|
687
|
+
:body => post_body,
|
|
688
|
+
:auth_names => auth_names,
|
|
689
|
+
:return_type => return_type
|
|
690
|
+
)
|
|
691
|
+
|
|
692
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
693
|
+
if @api_client.config.debugging
|
|
694
|
+
@api_client.config.logger.debug "API called: ListingsApi#get_vrbo_publish_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
695
|
+
end
|
|
696
|
+
return data, status_code, headers
|
|
697
|
+
end
|
|
698
|
+
|
|
629
699
|
# List a listing's stored photos
|
|
630
700
|
# Returns the photo set currently stored for this 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.
|
|
631
701
|
# @param id [Integer] Repull listing id
|
|
@@ -1003,6 +1073,76 @@ module Repull
|
|
|
1003
1073
|
return data, status_code, headers
|
|
1004
1074
|
end
|
|
1005
1075
|
|
|
1076
|
+
# Create a listing on Vrbo
|
|
1077
|
+
# Creates the listing on Vrbo in the host's connected Vrbo account, from the listing's content: title and description, property type, rooms and beds, amenities, photos, house rules (guests, minimum age, children, pets, smoking, events), check-in and check-out times, minimum stay, advance notice and booking window, the nightly price, cleaning, pet and extra-guest fees, the cancellation policy and the licence number. Vrbo's automatic new-listing discount is turned off so the listing sells at your prices. **It is a job.** Vrbo's onboarding takes 5–15 minutes (photos go up one at a time), so this answers `202` with `job.jobId`. Poll `GET /v1/listings/{id}/publish/vrbo?jobId=` for each finished step. When Vrbo has published the listing, that read links the new Vrbo unit to the listing with calendar sync on and queues the whole calendar (prices, availability, minimum stay) to Vrbo: **keep polling until `linked` is true.** **Which account.** A workspace with one Vrbo account needs nothing. With several, name it with `accountId` (`\"vrbo:13\"`, as the connection id). An account connected with messaging access is refused with `403 vrbo_messaging_access`. **Missing content** (street address, city, photos, nightly price, description) is refused with `422 listing_incomplete` naming what is missing. A listing already linked to a Vrbo unit is `409 listing_already_on_vrbo`. A run that failed part-way leaves an unpublished Vrbo property: publishing again completes it instead of creating a second one. This creates a Vrbo listing. Prices, availability and minimum stay on an existing one change through `PUT /v1/availability/{propertyId}`; other content of an existing Vrbo listing is edited on Vrbo.
|
|
1078
|
+
# @param id [Integer] Repull listing id
|
|
1079
|
+
# @param [Hash] opts the optional parameters
|
|
1080
|
+
# @option opts [PublishListingToVrboRequest] :publish_listing_to_vrbo_request
|
|
1081
|
+
# @return [GetVrboPublishJob200Response]
|
|
1082
|
+
def publish_listing_to_vrbo(id, opts = {})
|
|
1083
|
+
data, _status_code, _headers = publish_listing_to_vrbo_with_http_info(id, opts)
|
|
1084
|
+
data
|
|
1085
|
+
end
|
|
1086
|
+
|
|
1087
|
+
# Create a listing on Vrbo
|
|
1088
|
+
# Creates the listing on Vrbo in the host's connected Vrbo account, from the listing's content: title and description, property type, rooms and beds, amenities, photos, house rules (guests, minimum age, children, pets, smoking, events), check-in and check-out times, minimum stay, advance notice and booking window, the nightly price, cleaning, pet and extra-guest fees, the cancellation policy and the licence number. Vrbo's automatic new-listing discount is turned off so the listing sells at your prices. **It is a job.** Vrbo's onboarding takes 5–15 minutes (photos go up one at a time), so this answers `202` with `job.jobId`. Poll `GET /v1/listings/{id}/publish/vrbo?jobId=` for each finished step. When Vrbo has published the listing, that read links the new Vrbo unit to the listing with calendar sync on and queues the whole calendar (prices, availability, minimum stay) to Vrbo: **keep polling until `linked` is true.** **Which account.** A workspace with one Vrbo account needs nothing. With several, name it with `accountId` (`\"vrbo:13\"`, as the connection id). An account connected with messaging access is refused with `403 vrbo_messaging_access`. **Missing content** (street address, city, photos, nightly price, description) is refused with `422 listing_incomplete` naming what is missing. A listing already linked to a Vrbo unit is `409 listing_already_on_vrbo`. A run that failed part-way leaves an unpublished Vrbo property: publishing again completes it instead of creating a second one. This creates a Vrbo listing. Prices, availability and minimum stay on an existing one change through `PUT /v1/availability/{propertyId}`; other content of an existing Vrbo listing is edited on Vrbo.
|
|
1089
|
+
# @param id [Integer] Repull listing id
|
|
1090
|
+
# @param [Hash] opts the optional parameters
|
|
1091
|
+
# @option opts [PublishListingToVrboRequest] :publish_listing_to_vrbo_request
|
|
1092
|
+
# @return [Array<(GetVrboPublishJob200Response, Integer, Hash)>] GetVrboPublishJob200Response data, response status code and response headers
|
|
1093
|
+
def publish_listing_to_vrbo_with_http_info(id, opts = {})
|
|
1094
|
+
if @api_client.config.debugging
|
|
1095
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.publish_listing_to_vrbo ...'
|
|
1096
|
+
end
|
|
1097
|
+
# verify the required parameter 'id' is set
|
|
1098
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1099
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ListingsApi.publish_listing_to_vrbo"
|
|
1100
|
+
end
|
|
1101
|
+
# resource path
|
|
1102
|
+
local_var_path = '/v1/listings/{id}/publish/vrbo'.sub('{id}', CGI.escape(id.to_s))
|
|
1103
|
+
|
|
1104
|
+
# query parameters
|
|
1105
|
+
query_params = opts[:query_params] || {}
|
|
1106
|
+
|
|
1107
|
+
# header parameters
|
|
1108
|
+
header_params = opts[:header_params] || {}
|
|
1109
|
+
# HTTP header 'Accept' (if needed)
|
|
1110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1111
|
+
# HTTP header 'Content-Type'
|
|
1112
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1113
|
+
if !content_type.nil?
|
|
1114
|
+
header_params['Content-Type'] = content_type
|
|
1115
|
+
end
|
|
1116
|
+
|
|
1117
|
+
# form parameters
|
|
1118
|
+
form_params = opts[:form_params] || {}
|
|
1119
|
+
|
|
1120
|
+
# http body (model)
|
|
1121
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'publish_listing_to_vrbo_request'])
|
|
1122
|
+
|
|
1123
|
+
# return_type
|
|
1124
|
+
return_type = opts[:debug_return_type] || 'GetVrboPublishJob200Response'
|
|
1125
|
+
|
|
1126
|
+
# auth_names
|
|
1127
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1128
|
+
|
|
1129
|
+
new_options = opts.merge(
|
|
1130
|
+
:operation => :"ListingsApi.publish_listing_to_vrbo",
|
|
1131
|
+
:header_params => header_params,
|
|
1132
|
+
:query_params => query_params,
|
|
1133
|
+
:form_params => form_params,
|
|
1134
|
+
:body => post_body,
|
|
1135
|
+
:auth_names => auth_names,
|
|
1136
|
+
:return_type => return_type
|
|
1137
|
+
)
|
|
1138
|
+
|
|
1139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1140
|
+
if @api_client.config.debugging
|
|
1141
|
+
@api_client.config.logger.debug "API called: ListingsApi#publish_listing_to_vrbo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1142
|
+
end
|
|
1143
|
+
return data, status_code, headers
|
|
1144
|
+
end
|
|
1145
|
+
|
|
1006
1146
|
# Refresh a listing from Airbnb
|
|
1007
1147
|
# Re-read this listing from Airbnb and update your stored copy, then report what was refreshed and when. The mirror image of `POST /v1/listings/{id}/publish/airbnb`. Every other Airbnb read on this API is served from our database. This endpoint is the one that goes and asks Airbnb — use it after a push, to see the values Airbnb actually kept, or when a host has changed something in the Airbnb app. **What it refreshes:** basic listing facts (property type, bedrooms, beds, bathrooms, capacity), descriptions, photos, rooms and beds, amenities, booking settings (check-in/check-out windows, guest controls, cancellation policy), stay rules (min/max nights, advance-booking window, turnover buffer), pricing settings and standard fees, permits, checkout tasks and the check-in guide. After it returns, those values are what `GET /v1/listings/{id}?include=content,details` and the `/v1/channels/airbnb/**` routes serve. **What it does NOT refresh:** the calendar (nightly rates and availability — see `GET /v1/channels/airbnb/listings/{id}/availability`), reservations, messages, reviews or payouts. Those arrive continuously through the channel's own sync and never need a manual pull. **Runs synchronously** — the response is the result, not a job id. Expect several seconds. **One pull per listing per 15 minutes.** A pull is roughly a dozen Airbnb calls; a second call inside the window returns `429 rate_limit_exceeded` with `Retry-After` and `nextPullAvailableAt`, and makes no Airbnb calls. Two simultaneous calls cannot both run. 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.
|
|
1008
1148
|
# @param id [Integer]
|
|
@@ -1074,7 +1214,7 @@ module Repull
|
|
|
1074
1214
|
end
|
|
1075
1215
|
|
|
1076
1216
|
# Set a listing's markup on a channel
|
|
1077
|
-
# Set the markup one channel adds to this listing's price. When the value changes, the affected listings' prices are re-sent to that channel straight away (`pricesResent`); nothing else is sent. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one. On Booking.com the markup belongs to the property, so setting it reprices every listing on that property (`affectedListingIds`). A listing on more than one property must name one with `hotelId`; without it the request is refused with `409 ambiguous_booking_mapping` listing the candidates, rather than repricing a property it guessed. `markupPercent` is a percentage — `15` for 15%. A value between 0 and 1 is refused as a probable fraction, with the number to send instead.
|
|
1217
|
+
# Set the markup one channel adds to this listing's price. When the value changes, the affected listings' prices are re-sent to that channel straight away (`pricesResent`); nothing else is sent. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). - **Vrbo** — one markup per connected **Vrbo account**, shared by every listing linked on it (`listingIds` names them). Prices reach Vrbo through its calendar queue. Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one. On Booking.com the markup belongs to the property, so setting it reprices every listing on that property (`affectedListingIds`). A listing on more than one property must name one with `hotelId`; without it the request is refused with `409 ambiguous_booking_mapping` listing the candidates, rather than repricing a property it guessed. On Vrbo the markup belongs to the connected Vrbo account, so setting it reprices every listing linked on that account (`affectedListingIds`). A listing linked on more than one account names one with `accountId`, else `409 ambiguous_vrbo_account`; a listing not linked to Vrbo is `409 listing_not_on_vrbo`. `markupPercent` is a percentage — `15` for 15%. A value between 0 and 1 is refused as a probable fraction, with the number to send instead.
|
|
1078
1218
|
# @param id [String] Repull listing id.
|
|
1079
1219
|
# @param set_listing_markup_request [SetListingMarkupRequest]
|
|
1080
1220
|
# @param [Hash] opts the optional parameters
|
|
@@ -1085,7 +1225,7 @@ module Repull
|
|
|
1085
1225
|
end
|
|
1086
1226
|
|
|
1087
1227
|
# Set a listing's markup on a channel
|
|
1088
|
-
# Set the markup one channel adds to this listing's price. When the value changes, the affected listings' prices are re-sent to that channel straight away (`pricesResent`); nothing else is sent. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one. On Booking.com the markup belongs to the property, so setting it reprices every listing on that property (`affectedListingIds`). A listing on more than one property must name one with `hotelId`; without it the request is refused with `409 ambiguous_booking_mapping` listing the candidates, rather than repricing a property it guessed. `markupPercent` is a percentage — `15` for 15%. A value between 0 and 1 is refused as a probable fraction, with the number to send instead.
|
|
1228
|
+
# Set the markup one channel adds to this listing's price. When the value changes, the affected listings' prices are re-sent to that channel straight away (`pricesResent`); nothing else is sent. A listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel. - **Airbnb** — one markup per listing. - **Booking.com** — one markup per **property**, shared by every listing priced through it (`listingIds` names them). - **Vrbo** — one markup per connected **Vrbo account**, shared by every listing linked on it (`listingIds` names them). Prices reach Vrbo through its calendar queue. Returns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one. On Booking.com the markup belongs to the property, so setting it reprices every listing on that property (`affectedListingIds`). A listing on more than one property must name one with `hotelId`; without it the request is refused with `409 ambiguous_booking_mapping` listing the candidates, rather than repricing a property it guessed. On Vrbo the markup belongs to the connected Vrbo account, so setting it reprices every listing linked on that account (`affectedListingIds`). A listing linked on more than one account names one with `accountId`, else `409 ambiguous_vrbo_account`; a listing not linked to Vrbo is `409 listing_not_on_vrbo`. `markupPercent` is a percentage — `15` for 15%. A value between 0 and 1 is refused as a probable fraction, with the number to send instead.
|
|
1089
1229
|
# @param id [String] Repull listing id.
|
|
1090
1230
|
# @param set_listing_markup_request [SetListingMarkupRequest]
|
|
1091
1231
|
# @param [Hash] opts the optional parameters
|
|
@@ -1450,7 +1590,7 @@ module Repull
|
|
|
1450
1590
|
end
|
|
1451
1591
|
|
|
1452
1592
|
# Update canonical listing content
|
|
1453
|
-
# 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. **Listings managed in a connected PMS** (Guesty, Hostaway, …): the PMS owns their content, so title, descriptions, check-in/out times, capacity, amenities, house rules, address and added photos are written to the PMS first; Repull keeps only what it accepted (refused sections are in `deferred`, its per-section outcome in `pms`). A section that PMS cannot write returns `422 pms_write_unsupported` naming it when nothing was applied (or is listed in `deferred` when other sections were); `GET /v1/listings/{id}` → `capabilities.pms.listings` says which sections it takes. A PMS whose connector writes no listing content at all (Mews, Cloudbeds, Lodgify, …) keeps today's behaviour: the content is written to Repull only. Send photos with `photosMode: \"append\"` — replacing a PMS listing's photo set needs the PMS's own photo ids. A revoked PMS connection is `403 connection_reauth_required`. **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). **Multilingual:** send `locale` to say which language this copy is in (`it`, `pt-BR`, …). Canonical content is stored per locale, so each language keeps its own row instead of overwriting the English one. Omit it for English. **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
|
|
1593
|
+
# 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. **Listings managed in a connected PMS** (Guesty, Hostaway, …): the PMS owns their content, so title, descriptions, check-in/out times, capacity, amenities, house rules, address and added photos are written to the PMS first; Repull keeps only what it accepted (refused sections are in `deferred`, its per-section outcome in `pms`). A section that PMS cannot write returns `422 pms_write_unsupported` naming it when nothing was applied (or is listed in `deferred` when other sections were); `GET /v1/listings/{id}` → `capabilities.pms.listings` says which sections it takes. A PMS whose connector writes no listing content at all (Mews, Cloudbeds, Lodgify, …) keeps today's behaviour: the content is written to Repull only. Send photos with `photosMode: \"append\"` — replacing a PMS listing's photo set needs the PMS's own photo ids. A revoked PMS connection is `403 connection_reauth_required`. **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). **Multilingual:** send `locale` to say which language this copy is in (`it`, `pt-BR`, …). Canonical content is stored per locale, so each language keeps its own row instead of overwriting the English one. Omit it for English. **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:** `photos` is a list of hosted image URLs (or structured refs) saved to the listing in order: a full replacement by default, or added after the existing ones with `photosMode: \"append\"`. A publish sends them to the channels. An array with no valid http(s) URL is reported in `deferred` and the existing photos are left alone. 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. 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.
|
|
1454
1594
|
# @param id [Integer] Repull listing id
|
|
1455
1595
|
# @param listing_content_update_request [ListingContentUpdateRequest]
|
|
1456
1596
|
# @param [Hash] opts the optional parameters
|
|
@@ -1462,7 +1602,7 @@ module Repull
|
|
|
1462
1602
|
end
|
|
1463
1603
|
|
|
1464
1604
|
# Update canonical listing content
|
|
1465
|
-
# 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. **Listings managed in a connected PMS** (Guesty, Hostaway, …): the PMS owns their content, so title, descriptions, check-in/out times, capacity, amenities, house rules, address and added photos are written to the PMS first; Repull keeps only what it accepted (refused sections are in `deferred`, its per-section outcome in `pms`). A section that PMS cannot write returns `422 pms_write_unsupported` naming it when nothing was applied (or is listed in `deferred` when other sections were); `GET /v1/listings/{id}` → `capabilities.pms.listings` says which sections it takes. A PMS whose connector writes no listing content at all (Mews, Cloudbeds, Lodgify, …) keeps today's behaviour: the content is written to Repull only. Send photos with `photosMode: \"append\"` — replacing a PMS listing's photo set needs the PMS's own photo ids. A revoked PMS connection is `403 connection_reauth_required`. **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). **Multilingual:** send `locale` to say which language this copy is in (`it`, `pt-BR`, …). Canonical content is stored per locale, so each language keeps its own row instead of overwriting the English one. Omit it for English. **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
|
|
1605
|
+
# 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. **Listings managed in a connected PMS** (Guesty, Hostaway, …): the PMS owns their content, so title, descriptions, check-in/out times, capacity, amenities, house rules, address and added photos are written to the PMS first; Repull keeps only what it accepted (refused sections are in `deferred`, its per-section outcome in `pms`). A section that PMS cannot write returns `422 pms_write_unsupported` naming it when nothing was applied (or is listed in `deferred` when other sections were); `GET /v1/listings/{id}` → `capabilities.pms.listings` says which sections it takes. A PMS whose connector writes no listing content at all (Mews, Cloudbeds, Lodgify, …) keeps today's behaviour: the content is written to Repull only. Send photos with `photosMode: \"append\"` — replacing a PMS listing's photo set needs the PMS's own photo ids. A revoked PMS connection is `403 connection_reauth_required`. **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). **Multilingual:** send `locale` to say which language this copy is in (`it`, `pt-BR`, …). Canonical content is stored per locale, so each language keeps its own row instead of overwriting the English one. Omit it for English. **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:** `photos` is a list of hosted image URLs (or structured refs) saved to the listing in order: a full replacement by default, or added after the existing ones with `photosMode: \"append\"`. A publish sends them to the channels. An array with no valid http(s) URL is reported in `deferred` and the existing photos are left alone. 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. 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.
|
|
1466
1606
|
# @param id [Integer] Repull listing id
|
|
1467
1607
|
# @param listing_content_update_request [ListingContentUpdateRequest]
|
|
1468
1608
|
# @param [Hash] opts the optional parameters
|
|
@@ -394,6 +394,99 @@ module Repull
|
|
|
394
394
|
return data, status_code, headers
|
|
395
395
|
end
|
|
396
396
|
|
|
397
|
+
# Summarize reservations for a period
|
|
398
|
+
# Bookings, nights, revenue, payout, average nightly rate, occupancy and cancellations for a period, in one small response — optionally grouped by `month`, `listing` and/or `channel`. Use it for reporting instead of paging through `GET /v1/reservations`. **Counting (`basis`):** `stay` (default) counts the nights that fall inside `from`–`to` and splits each reservation’s money across its nights, so a stay crossing the window or a month edge brings only its share. `check_in` and `booked` count whole reservations by their check-in or booking date. **Pace (`as_of`):** keeps only what was on the books at the end of that day — booked by then and not yet cancelled. To compare the next three months with the same months last year like for like, ask for last year’s window with `as_of` set to today’s date one year ago. Owner stays are reported apart and never count as revenue or occupancy. Pending requests are counted in `pending` only. Reservations on inactive listings are left out.
|
|
399
|
+
# @param from [Date] First day of the period.
|
|
400
|
+
# @param to [Date] Last day of the period (inclusive). At most 732 days after `from`.
|
|
401
|
+
# @param [Hash] opts the optional parameters
|
|
402
|
+
# @option opts [String] :account Only the records of one connected account, as `provider:externalAccountId` — the pair from a webhook `account` block, `connect.session.completed`, or `GET /v1/connect/{provider}` → `accounts`. A record belongs to an account when it is on that account's listings and on its channel (a PMS account: came in through that PMS). An account with no listings returns an empty page.
|
|
403
|
+
# @option opts [String] :basis Which date puts a reservation in the period: the nights stayed (`stay`), the check-in date, or the booking date. (default to 'stay')
|
|
404
|
+
# @option opts [String] :group_by Up to two of `month`, `listing`, `channel`, comma-separated. Omit for totals only.
|
|
405
|
+
# @option opts [Date] :as_of Count only what was on the books at the end of this day. A reservation cancelled without a reported cancellation date counts as cancelled.
|
|
406
|
+
# @option opts [Integer] :listing_id One listing only.
|
|
407
|
+
# @option opts [String] :platform One channel only.
|
|
408
|
+
# @return [GetReservationSummary200Response]
|
|
409
|
+
def get_reservation_summary(from, to, opts = {})
|
|
410
|
+
data, _status_code, _headers = get_reservation_summary_with_http_info(from, to, opts)
|
|
411
|
+
data
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Summarize reservations for a period
|
|
415
|
+
# Bookings, nights, revenue, payout, average nightly rate, occupancy and cancellations for a period, in one small response — optionally grouped by `month`, `listing` and/or `channel`. Use it for reporting instead of paging through `GET /v1/reservations`. **Counting (`basis`):** `stay` (default) counts the nights that fall inside `from`–`to` and splits each reservation’s money across its nights, so a stay crossing the window or a month edge brings only its share. `check_in` and `booked` count whole reservations by their check-in or booking date. **Pace (`as_of`):** keeps only what was on the books at the end of that day — booked by then and not yet cancelled. To compare the next three months with the same months last year like for like, ask for last year’s window with `as_of` set to today’s date one year ago. Owner stays are reported apart and never count as revenue or occupancy. Pending requests are counted in `pending` only. Reservations on inactive listings are left out.
|
|
416
|
+
# @param from [Date] First day of the period.
|
|
417
|
+
# @param to [Date] Last day of the period (inclusive). At most 732 days after `from`.
|
|
418
|
+
# @param [Hash] opts the optional parameters
|
|
419
|
+
# @option opts [String] :account Only the records of one connected account, as `provider:externalAccountId` — the pair from a webhook `account` block, `connect.session.completed`, or `GET /v1/connect/{provider}` → `accounts`. A record belongs to an account when it is on that account's listings and on its channel (a PMS account: came in through that PMS). An account with no listings returns an empty page.
|
|
420
|
+
# @option opts [String] :basis Which date puts a reservation in the period: the nights stayed (`stay`), the check-in date, or the booking date. (default to 'stay')
|
|
421
|
+
# @option opts [String] :group_by Up to two of `month`, `listing`, `channel`, comma-separated. Omit for totals only.
|
|
422
|
+
# @option opts [Date] :as_of Count only what was on the books at the end of this day. A reservation cancelled without a reported cancellation date counts as cancelled.
|
|
423
|
+
# @option opts [Integer] :listing_id One listing only.
|
|
424
|
+
# @option opts [String] :platform One channel only.
|
|
425
|
+
# @return [Array<(GetReservationSummary200Response, Integer, Hash)>] GetReservationSummary200Response data, response status code and response headers
|
|
426
|
+
def get_reservation_summary_with_http_info(from, to, opts = {})
|
|
427
|
+
if @api_client.config.debugging
|
|
428
|
+
@api_client.config.logger.debug 'Calling API: ReservationsApi.get_reservation_summary ...'
|
|
429
|
+
end
|
|
430
|
+
# verify the required parameter 'from' is set
|
|
431
|
+
if @api_client.config.client_side_validation && from.nil?
|
|
432
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling ReservationsApi.get_reservation_summary"
|
|
433
|
+
end
|
|
434
|
+
# verify the required parameter 'to' is set
|
|
435
|
+
if @api_client.config.client_side_validation && to.nil?
|
|
436
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling ReservationsApi.get_reservation_summary"
|
|
437
|
+
end
|
|
438
|
+
allowable_values = ["stay", "check_in", "booked"]
|
|
439
|
+
if @api_client.config.client_side_validation && opts[:'basis'] && !allowable_values.include?(opts[:'basis'])
|
|
440
|
+
fail ArgumentError, "invalid value for \"basis\", must be one of #{allowable_values}"
|
|
441
|
+
end
|
|
442
|
+
# resource path
|
|
443
|
+
local_var_path = '/v1/reservations/summary'
|
|
444
|
+
|
|
445
|
+
# query parameters
|
|
446
|
+
query_params = opts[:query_params] || {}
|
|
447
|
+
query_params[:'from'] = from
|
|
448
|
+
query_params[:'to'] = to
|
|
449
|
+
query_params[:'account'] = opts[:'account'] if !opts[:'account'].nil?
|
|
450
|
+
query_params[:'basis'] = opts[:'basis'] if !opts[:'basis'].nil?
|
|
451
|
+
query_params[:'group_by'] = opts[:'group_by'] if !opts[:'group_by'].nil?
|
|
452
|
+
query_params[:'as_of'] = opts[:'as_of'] if !opts[:'as_of'].nil?
|
|
453
|
+
query_params[:'listing_id'] = opts[:'listing_id'] if !opts[:'listing_id'].nil?
|
|
454
|
+
query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
|
|
455
|
+
|
|
456
|
+
# header parameters
|
|
457
|
+
header_params = opts[:header_params] || {}
|
|
458
|
+
# HTTP header 'Accept' (if needed)
|
|
459
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
460
|
+
|
|
461
|
+
# form parameters
|
|
462
|
+
form_params = opts[:form_params] || {}
|
|
463
|
+
|
|
464
|
+
# http body (model)
|
|
465
|
+
post_body = opts[:debug_body]
|
|
466
|
+
|
|
467
|
+
# return_type
|
|
468
|
+
return_type = opts[:debug_return_type] || 'GetReservationSummary200Response'
|
|
469
|
+
|
|
470
|
+
# auth_names
|
|
471
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
472
|
+
|
|
473
|
+
new_options = opts.merge(
|
|
474
|
+
:operation => :"ReservationsApi.get_reservation_summary",
|
|
475
|
+
:header_params => header_params,
|
|
476
|
+
:query_params => query_params,
|
|
477
|
+
:form_params => form_params,
|
|
478
|
+
:body => post_body,
|
|
479
|
+
:auth_names => auth_names,
|
|
480
|
+
:return_type => return_type
|
|
481
|
+
)
|
|
482
|
+
|
|
483
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
484
|
+
if @api_client.config.debugging
|
|
485
|
+
@api_client.config.logger.debug "API called: ReservationsApi#get_reservation_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
486
|
+
end
|
|
487
|
+
return data, status_code, headers
|
|
488
|
+
end
|
|
489
|
+
|
|
397
490
|
# List reservations
|
|
398
491
|
# Cursor-paginated list of reservations across all connected PMS platforms. Filter by platform, status, listing, or check-in date range. **Pagination:** Walk pages with `?cursor=` — pass `pagination.nextCursor` from one response back as `?cursor=` on the next request. Stop when `pagination.hasMore` is `false`. `limit` defaults to 50, max 100; requesting more returns 422 (no silent truncation). `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. For deep pagination cursor remains O(1) per page; offset > 10000 returns 422 with a docs link. **Incremental sync (only changes since last poll):** pass `?updated_since=<ISO8601>` to receive only reservations amended, cancelled, or created at or after that instant — no full re-walk. Each row carries `updatedAt`; the last row of the final page is your next watermark. Note that `updated_since` changes the page ordering to `updatedAt ASC, id ASC` (and the cursor with it) so mid-walk amendments cannot be skipped — see the parameter description for the full contract. Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`.
|
|
399
492
|
# @param [Hash] opts the optional parameters
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
# Payload for `account.disconnected`. A PMS or channel connection was revoked, expired, or rejected by the upstream provider.
|
|
17
|
+
# Payload for `account.disconnected`. A PMS or channel connection was revoked, expired, or rejected by the upstream provider. Sent for Airbnb, Booking.com Extranet logins, Vrbo logins and PMS connections (Hostaway, Guesty, Smoobu, Lodgify, Beds24, Hospitable, OwnerRez, iGMS, BookingSync, Track, Mews, Cloudbeds, Zeevou, RentalReady, CiiRUS, …). A PMS connection is reported when the PMS refuses its credentials (API key revoked or invalid, 401/403, token refresh refused); timeouts, rate limits and 5xx errors are retried and never reported. Sent once per disconnect, not on every failed sync. When the connection works again — credentials fixed in the PMS, or reconnected — Repull re-imports the changes made while it was down and sends their `reservation.*` events, so nothing missed has to be fetched by hand.
|
|
18
18
|
class AccountDisconnectedPayload < ApiModelBase
|
|
19
19
|
attr_accessor :workspace_id
|
|
20
20
|
|
|
@@ -23,11 +23,12 @@ module Repull
|
|
|
23
23
|
# Stable connection identifier — alias of accountId for this event variant.
|
|
24
24
|
attr_accessor :connection_id
|
|
25
25
|
|
|
26
|
+
# Channel or PMS id: `airbnb`, `booking_extranet`, `vrbo`, or the PMS (`hostaway`, `guesty`, `smoobu`, …).
|
|
26
27
|
attr_accessor :provider
|
|
27
28
|
|
|
28
29
|
attr_accessor :disconnected_at
|
|
29
30
|
|
|
30
|
-
# Why the connection was lost. `refresh_token_rejected` — upstream OAuth refresh endpoint returned a hard rejection. `manual_disconnect` — host/admin disconnected via the dashboard. `auth_expired` — credentials
|
|
31
|
+
# Why the connection was lost. `refresh_token_rejected` — upstream OAuth refresh endpoint returned a hard rejection. `manual_disconnect` — host/admin disconnected via the dashboard. `auth_expired` — the saved credentials stopped working: an Extranet or Vrbo login was signed out, or a PMS rejected its API key or token (401/403). `revoked_upstream` — provider notified us the user revoked access.
|
|
31
32
|
attr_accessor :reason
|
|
32
33
|
|
|
33
34
|
# The listings this account holds in your workspace — the ones that stop syncing until it is reconnected. Identity only; inactive listings included. Matches `channels[].account` on `GET /v1/listings`. Empty when the account has no listings here.
|
|
@@ -22,12 +22,15 @@ module Repull
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :booking
|
|
24
24
|
|
|
25
|
+
attr_accessor :vrbo
|
|
26
|
+
|
|
25
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
28
|
def self.attribute_map
|
|
27
29
|
{
|
|
28
30
|
:'id' => :'id',
|
|
29
31
|
:'airbnb' => :'airbnb',
|
|
30
|
-
:'booking' => :'booking'
|
|
32
|
+
:'booking' => :'booking',
|
|
33
|
+
:'vrbo' => :'vrbo'
|
|
31
34
|
}
|
|
32
35
|
end
|
|
33
36
|
|
|
@@ -46,7 +49,8 @@ module Repull
|
|
|
46
49
|
{
|
|
47
50
|
:'id' => :'String',
|
|
48
51
|
:'airbnb' => :'Array<GetListingMarkups200ResponseAirbnbInner>',
|
|
49
|
-
:'booking' => :'Array<GetListingMarkups200ResponseBookingInner>'
|
|
52
|
+
:'booking' => :'Array<GetListingMarkups200ResponseBookingInner>',
|
|
53
|
+
:'vrbo' => :'Array<GetListingMarkups200ResponseVrboInner>'
|
|
50
54
|
}
|
|
51
55
|
end
|
|
52
56
|
|
|
@@ -87,6 +91,12 @@ module Repull
|
|
|
87
91
|
self.booking = value
|
|
88
92
|
end
|
|
89
93
|
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'vrbo')
|
|
96
|
+
if (value = attributes[:'vrbo']).is_a?(Array)
|
|
97
|
+
self.vrbo = value
|
|
98
|
+
end
|
|
99
|
+
end
|
|
90
100
|
end
|
|
91
101
|
|
|
92
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -111,7 +121,8 @@ module Repull
|
|
|
111
121
|
self.class == o.class &&
|
|
112
122
|
id == o.id &&
|
|
113
123
|
airbnb == o.airbnb &&
|
|
114
|
-
booking == o.booking
|
|
124
|
+
booking == o.booking &&
|
|
125
|
+
vrbo == o.vrbo
|
|
115
126
|
end
|
|
116
127
|
|
|
117
128
|
# @see the `==` method
|
|
@@ -123,7 +134,7 @@ module Repull
|
|
|
123
134
|
# Calculates hash code according to all attributes.
|
|
124
135
|
# @return [Integer] Hash code
|
|
125
136
|
def hash
|
|
126
|
-
[id, airbnb, booking].hash
|
|
137
|
+
[id, airbnb, booking, vrbo].hash
|
|
127
138
|
end
|
|
128
139
|
|
|
129
140
|
# Builds the object from hash
|