repull 0.2.0
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 +7 -0
- data/Gemfile +10 -0
- data/LICENSE +21 -0
- data/README.md +121 -0
- data/Rakefile +10 -0
- data/examples/connect_airbnb.rb +33 -0
- data/examples/quickstart.rb +22 -0
- data/lib/repull/api/ai_api.rb +86 -0
- data/lib/repull/api/airbnb_api.rb +1155 -0
- data/lib/repull/api/atlas_api.rb +194 -0
- data/lib/repull/api/availability_api.rb +167 -0
- data/lib/repull/api/billing_api.rb +139 -0
- data/lib/repull/api/booking_com_api.rb +617 -0
- data/lib/repull/api/connect_api.rb +672 -0
- data/lib/repull/api/conversations_api.rb +263 -0
- data/lib/repull/api/guests_api.rb +171 -0
- data/lib/repull/api/listings_api.rb +509 -0
- data/lib/repull/api/markets_api.rb +320 -0
- data/lib/repull/api/plumguide_api.rb +299 -0
- data/lib/repull/api/pricing_api.rb +453 -0
- data/lib/repull/api/properties_api.rb +166 -0
- data/lib/repull/api/reservations_api.rb +387 -0
- data/lib/repull/api/reviews_api.rb +208 -0
- data/lib/repull/api/schema_api.rb +347 -0
- data/lib/repull/api/system_api.rb +79 -0
- data/lib/repull/api/vrbo_api.rb +262 -0
- data/lib/repull/api/webhooks_api.rb +867 -0
- data/lib/repull/api_client.rb +397 -0
- data/lib/repull/api_error.rb +58 -0
- data/lib/repull/api_model_base.rb +88 -0
- data/lib/repull/configuration.rb +313 -0
- data/lib/repull/models/ai_operation.rb +158 -0
- data/lib/repull/models/airbnb_listing.rb +229 -0
- data/lib/repull/models/airbnb_listing_list_response.rb +158 -0
- data/lib/repull/models/airbnb_reservation.rb +224 -0
- data/lib/repull/models/airbnb_reservation_list_response.rb +158 -0
- data/lib/repull/models/airbnb_review.rb +222 -0
- data/lib/repull/models/airbnb_review_list_response.rb +158 -0
- data/lib/repull/models/airbnb_thread.rb +188 -0
- data/lib/repull/models/airbnb_thread_list_response.rb +158 -0
- data/lib/repull/models/booking_connect_listing_option.rb +201 -0
- data/lib/repull/models/booking_connect_room.rb +251 -0
- data/lib/repull/models/booking_connect_rooms_response.rb +274 -0
- data/lib/repull/models/booking_conversation.rb +178 -0
- data/lib/repull/models/booking_conversation_list_response.rb +158 -0
- data/lib/repull/models/booking_pricing_rate_update.rb +310 -0
- data/lib/repull/models/booking_pricing_rate_update_date_range.rb +190 -0
- data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +179 -0
- data/lib/repull/models/booking_pricing_response.rb +157 -0
- data/lib/repull/models/booking_pricing_update_request.rb +176 -0
- data/lib/repull/models/booking_pricing_update_response.rb +199 -0
- data/lib/repull/models/booking_property.rb +188 -0
- data/lib/repull/models/booking_property_list_response.rb +158 -0
- data/lib/repull/models/booking_room_mapping.rb +177 -0
- data/lib/repull/models/booking_verify_hotel_request.rb +193 -0
- data/lib/repull/models/booking_verify_hotel_response.rb +285 -0
- data/lib/repull/models/bulk_pricing_failure.rb +177 -0
- data/lib/repull/models/bulk_pricing_item.rb +202 -0
- data/lib/repull/models/bulk_pricing_request.rb +212 -0
- data/lib/repull/models/bulk_pricing_response.rb +170 -0
- data/lib/repull/models/calendar_day.rb +174 -0
- data/lib/repull/models/calendar_response.rb +149 -0
- data/lib/repull/models/connect_host.rb +194 -0
- data/lib/repull/models/connect_provider.rb +365 -0
- data/lib/repull/models/connect_provider_list_response.rb +149 -0
- data/lib/repull/models/connect_session.rb +228 -0
- data/lib/repull/models/connect_status.rb +207 -0
- data/lib/repull/models/connection.rb +195 -0
- data/lib/repull/models/connection_list_response.rb +158 -0
- data/lib/repull/models/conversation.rb +257 -0
- data/lib/repull/models/conversation_detail.rb +284 -0
- data/lib/repull/models/conversation_guest.rb +178 -0
- data/lib/repull/models/conversation_guest_contact.rb +174 -0
- data/lib/repull/models/conversation_host.rb +186 -0
- data/lib/repull/models/conversation_list_response.rb +159 -0
- data/lib/repull/models/conversation_message_attachment.rb +174 -0
- data/lib/repull/models/create_ai_operation200_response.rb +156 -0
- data/lib/repull/models/create_billing_checkout_request.rb +181 -0
- data/lib/repull/models/create_connect_session_request.rb +189 -0
- data/lib/repull/models/create_connection_request.rb +225 -0
- data/lib/repull/models/create_reservation_request.rb +313 -0
- data/lib/repull/models/create_webhook_request.rb +211 -0
- data/lib/repull/models/custom_schema.rb +303 -0
- data/lib/repull/models/custom_schema_create.rb +253 -0
- data/lib/repull/models/custom_schema_create_response.rb +300 -0
- data/lib/repull/models/custom_schema_delete_response.rb +164 -0
- data/lib/repull/models/custom_schema_list_response.rb +159 -0
- data/lib/repull/models/custom_schema_summary.rb +300 -0
- data/lib/repull/models/custom_schema_update.rb +199 -0
- data/lib/repull/models/error.rb +165 -0
- data/lib/repull/models/error_error.rb +357 -0
- data/lib/repull/models/error_error_support.rb +167 -0
- data/lib/repull/models/get_health200_response.rb +156 -0
- data/lib/repull/models/guest.rb +271 -0
- data/lib/repull/models/guest_contact.rb +186 -0
- data/lib/repull/models/guest_flag.rb +179 -0
- data/lib/repull/models/guest_list_response.rb +159 -0
- data/lib/repull/models/guest_note.rb +187 -0
- data/lib/repull/models/guest_profile.rb +337 -0
- data/lib/repull/models/guest_reservations_summary.rb +175 -0
- data/lib/repull/models/listing.rb +216 -0
- data/lib/repull/models/listing_address.rb +158 -0
- data/lib/repull/models/listing_channel.rb +176 -0
- data/lib/repull/models/listing_comp.rb +272 -0
- data/lib/repull/models/listing_comp_nightly.rb +166 -0
- data/lib/repull/models/listing_comp_ratings.rb +157 -0
- data/lib/repull/models/listing_comps_response.rb +197 -0
- data/lib/repull/models/listing_content.rb +249 -0
- data/lib/repull/models/listing_create_request.rb +364 -0
- data/lib/repull/models/listing_create_response.rb +148 -0
- data/lib/repull/models/listing_generate_content_request.rb +192 -0
- data/lib/repull/models/listing_generate_content_response.rb +165 -0
- data/lib/repull/models/listing_list_response.rb +158 -0
- data/lib/repull/models/listing_pricing_apply_request.rb +193 -0
- data/lib/repull/models/listing_pricing_apply_response.rb +169 -0
- data/lib/repull/models/listing_pricing_history_entry.rb +212 -0
- data/lib/repull/models/listing_pricing_history_response.rb +159 -0
- data/lib/repull/models/listing_pricing_recommendation.rb +269 -0
- data/lib/repull/models/listing_pricing_response.rb +187 -0
- data/lib/repull/models/listing_pricing_response_comp_summary.rb +178 -0
- data/lib/repull/models/listing_pricing_response_date_range.rb +156 -0
- data/lib/repull/models/listing_pricing_response_listing.rb +191 -0
- data/lib/repull/models/listing_pricing_strategy.rb +317 -0
- data/lib/repull/models/listing_pricing_strategy_input.rb +264 -0
- data/lib/repull/models/listing_publish_airbnb_request.rb +171 -0
- data/lib/repull/models/listing_publish_response.rb +166 -0
- data/lib/repull/models/listing_publish_status_channel.rb +197 -0
- data/lib/repull/models/listing_publish_status_response.rb +158 -0
- data/lib/repull/models/listing_quality_tier.rb +175 -0
- data/lib/repull/models/listing_segment.rb +229 -0
- data/lib/repull/models/listing_segment_recommendation.rb +170 -0
- data/lib/repull/models/listing_segments_response.rb +230 -0
- data/lib/repull/models/listing_segments_response_scope.rb +159 -0
- data/lib/repull/models/map_connect_booking_rooms_request.rb +202 -0
- data/lib/repull/models/map_connect_booking_rooms_response.rb +243 -0
- data/lib/repull/models/market_browse_category.rb +158 -0
- data/lib/repull/models/market_browse_entry.rb +197 -0
- data/lib/repull/models/market_browse_featured.rb +188 -0
- data/lib/repull/models/market_browse_response.rb +158 -0
- data/lib/repull/models/market_calendar_day.rb +257 -0
- data/lib/repull/models/market_calendar_day_events_inner.rb +177 -0
- data/lib/repull/models/market_calendar_response.rb +178 -0
- data/lib/repull/models/market_detail_response.rb +269 -0
- data/lib/repull/models/market_detail_response_price_distribution_inner.rb +186 -0
- data/lib/repull/models/market_detail_response_property_type_mix_inner.rb +166 -0
- data/lib/repull/models/market_detail_response_supply_trend_inner.rb +156 -0
- data/lib/repull/models/market_detail_response_top_comps.rb +187 -0
- data/lib/repull/models/market_event.rb +257 -0
- data/lib/repull/models/market_my_listing.rb +242 -0
- data/lib/repull/models/market_summary.rb +259 -0
- data/lib/repull/models/market_top_comp.rb +275 -0
- data/lib/repull/models/markets_overview_response.rb +219 -0
- data/lib/repull/models/markets_overview_response_browse.rb +173 -0
- data/lib/repull/models/markets_overview_response_subscriptions.rb +157 -0
- data/lib/repull/models/markets_overview_response_totals.rb +165 -0
- data/lib/repull/models/message.rb +289 -0
- data/lib/repull/models/message_list_response.rb +159 -0
- data/lib/repull/models/pagination.rb +188 -0
- data/lib/repull/models/plumguide_listing.rb +167 -0
- data/lib/repull/models/plumguide_listing_list_response.rb +158 -0
- data/lib/repull/models/property.rb +271 -0
- data/lib/repull/models/property_list_response.rb +158 -0
- data/lib/repull/models/reservation.rb +457 -0
- data/lib/repull/models/reservation_list_response.rb +159 -0
- data/lib/repull/models/review.rb +357 -0
- data/lib/repull/models/review_category.rb +169 -0
- data/lib/repull/models/review_list_response.rb +159 -0
- data/lib/repull/models/review_response.rb +158 -0
- data/lib/repull/models/rotate_webhook_secret200_response.rb +165 -0
- data/lib/repull/models/select_connect_provider_request.rb +165 -0
- data/lib/repull/models/select_provider_response.rb +176 -0
- data/lib/repull/models/test_webhook_request.rb +165 -0
- data/lib/repull/models/update_availability_request.rb +149 -0
- data/lib/repull/models/update_listing_pricing_strategy200_response.rb +147 -0
- data/lib/repull/models/update_reservation_request.rb +174 -0
- data/lib/repull/models/update_webhook_request.rb +211 -0
- data/lib/repull/models/vrbo_listing.rb +167 -0
- data/lib/repull/models/vrbo_listing_list_response.rb +158 -0
- data/lib/repull/models/vrbo_reservation.rb +185 -0
- data/lib/repull/models/vrbo_reservation_list_response.rb +158 -0
- data/lib/repull/models/webhook_delivery.rb +243 -0
- data/lib/repull/models/webhook_delivery_detail.rb +261 -0
- data/lib/repull/models/webhook_delivery_list_response.rb +158 -0
- data/lib/repull/models/webhook_event_catalog.rb +149 -0
- data/lib/repull/models/webhook_event_catalog_domains_inner.rb +167 -0
- data/lib/repull/models/webhook_event_catalog_domains_inner_events_inner.rb +183 -0
- data/lib/repull/models/webhook_list_response.rb +158 -0
- data/lib/repull/models/webhook_subscription.rb +294 -0
- data/lib/repull/version.rb +15 -0
- data/lib/repull.rb +217 -0
- data/openapi/v1.json +8923 -0
- data/repull.gemspec +43 -0
- data/scripts/regen.sh +55 -0
- data/spec/api/ai_api_spec.rb +47 -0
- data/spec/api/airbnb_api_spec.rb +238 -0
- data/spec/api/availability_api_spec.rb +62 -0
- data/spec/api/billing_api_spec.rb +57 -0
- data/spec/api/booking_com_api_spec.rb +115 -0
- data/spec/api/connect_api_spec.rb +82 -0
- data/spec/api/conversations_api_spec.rb +68 -0
- data/spec/api/guests_api_spec.rb +59 -0
- data/spec/api/plumguide_api_spec.rb +85 -0
- data/spec/api/properties_api_spec.rb +60 -0
- data/spec/api/reservations_api_spec.rb +97 -0
- data/spec/api/system_api_spec.rb +45 -0
- data/spec/api/vrbo_api_spec.rb +55 -0
- data/spec/api/webhooks_api_spec.rb +69 -0
- data/spec/models/ai_operation_spec.rb +46 -0
- data/spec/models/calendar_day_spec.rb +54 -0
- data/spec/models/connect_host_spec.rb +60 -0
- data/spec/models/connect_status_spec.rb +76 -0
- data/spec/models/connection_spec.rb +70 -0
- data/spec/models/conversation_spec.rb +66 -0
- data/spec/models/error_error_spec.rb +54 -0
- data/spec/models/error_spec.rb +36 -0
- data/spec/models/guest_spec.rb +72 -0
- data/spec/models/message_spec.rb +70 -0
- data/spec/models/property_spec.rb +114 -0
- data/spec/models/reservation_spec.rb +128 -0
- data/spec/models/webhook_subscription_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +337 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `pro`, `enterprise`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: ivan@vanio.ai
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Repull
|
|
16
|
+
class ConversationsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get conversation detail
|
|
23
|
+
# Returns one thread (the same shape as the list-row `Conversation`) plus expanded `host` (from `airbnb_hosts` for the thread's `host_id`) and `guest` (resolved via the thread's `reservation_id`, with up to 50 contacts) blocks.
|
|
24
|
+
# @param id [Integer] Internal Repull thread id.
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
27
|
+
# @return [ConversationDetail]
|
|
28
|
+
def get_conversation(id, opts = {})
|
|
29
|
+
data, _status_code, _headers = get_conversation_with_http_info(id, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Get conversation detail
|
|
34
|
+
# Returns one thread (the same shape as the list-row `Conversation`) plus expanded `host` (from `airbnb_hosts` for the thread's `host_id`) and `guest` (resolved via the thread's `reservation_id`, with up to 50 contacts) blocks.
|
|
35
|
+
# @param id [Integer] Internal Repull thread id.
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
38
|
+
# @return [Array<(ConversationDetail, Integer, Hash)>] ConversationDetail data, response status code and response headers
|
|
39
|
+
def get_conversation_with_http_info(id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: ConversationsApi.get_conversation ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.get_conversation"
|
|
46
|
+
end
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/v1/conversations/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
49
|
+
|
|
50
|
+
# query parameters
|
|
51
|
+
query_params = opts[:query_params] || {}
|
|
52
|
+
|
|
53
|
+
# header parameters
|
|
54
|
+
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
57
|
+
header_params[:'X-Schema'] = opts[:'x_schema'] if !opts[:'x_schema'].nil?
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body]
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'ConversationDetail'
|
|
67
|
+
|
|
68
|
+
# auth_names
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"ConversationsApi.get_conversation",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: ConversationsApi#get_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# List messages in a conversation
|
|
89
|
+
# Cursor-paginated messages within one thread. Defaults to newest-first (`?order=desc`); pass `?order=asc` for chronological replay. Use `pagination.nextCursor` from one response as the `cursor` query param of the next request.
|
|
90
|
+
# @param id [Integer] Internal Repull thread id.
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
93
|
+
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`.
|
|
94
|
+
# @option opts [Integer] :limit (default to 20)
|
|
95
|
+
# @option opts [String] :order `desc` (default) returns newest first. `asc` returns chronological replay. (default to 'desc')
|
|
96
|
+
# @return [MessageListResponse]
|
|
97
|
+
def list_conversation_messages(id, opts = {})
|
|
98
|
+
data, _status_code, _headers = list_conversation_messages_with_http_info(id, opts)
|
|
99
|
+
data
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# List messages in a conversation
|
|
103
|
+
# Cursor-paginated messages within one thread. Defaults to newest-first (`?order=desc`); pass `?order=asc` for chronological replay. Use `pagination.nextCursor` from one response as the `cursor` query param of the next request.
|
|
104
|
+
# @param id [Integer] Internal Repull thread id.
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
107
|
+
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`.
|
|
108
|
+
# @option opts [Integer] :limit (default to 20)
|
|
109
|
+
# @option opts [String] :order `desc` (default) returns newest first. `asc` returns chronological replay. (default to 'desc')
|
|
110
|
+
# @return [Array<(MessageListResponse, Integer, Hash)>] MessageListResponse data, response status code and response headers
|
|
111
|
+
def list_conversation_messages_with_http_info(id, opts = {})
|
|
112
|
+
if @api_client.config.debugging
|
|
113
|
+
@api_client.config.logger.debug 'Calling API: ConversationsApi.list_conversation_messages ...'
|
|
114
|
+
end
|
|
115
|
+
# verify the required parameter 'id' is set
|
|
116
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
117
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ConversationsApi.list_conversation_messages"
|
|
118
|
+
end
|
|
119
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
120
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ConversationsApi.list_conversation_messages, must be smaller than or equal to 100.'
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
124
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ConversationsApi.list_conversation_messages, must be greater than or equal to 1.'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
allowable_values = ["asc", "desc"]
|
|
128
|
+
if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
|
|
129
|
+
fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
130
|
+
end
|
|
131
|
+
# resource path
|
|
132
|
+
local_var_path = '/v1/conversations/{id}/messages'.sub('{id}', CGI.escape(id.to_s))
|
|
133
|
+
|
|
134
|
+
# query parameters
|
|
135
|
+
query_params = opts[:query_params] || {}
|
|
136
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
137
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
138
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
139
|
+
|
|
140
|
+
# header parameters
|
|
141
|
+
header_params = opts[:header_params] || {}
|
|
142
|
+
# HTTP header 'Accept' (if needed)
|
|
143
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
144
|
+
header_params[:'X-Schema'] = opts[:'x_schema'] if !opts[:'x_schema'].nil?
|
|
145
|
+
|
|
146
|
+
# form parameters
|
|
147
|
+
form_params = opts[:form_params] || {}
|
|
148
|
+
|
|
149
|
+
# http body (model)
|
|
150
|
+
post_body = opts[:debug_body]
|
|
151
|
+
|
|
152
|
+
# return_type
|
|
153
|
+
return_type = opts[:debug_return_type] || 'MessageListResponse'
|
|
154
|
+
|
|
155
|
+
# auth_names
|
|
156
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
157
|
+
|
|
158
|
+
new_options = opts.merge(
|
|
159
|
+
:operation => :"ConversationsApi.list_conversation_messages",
|
|
160
|
+
:header_params => header_params,
|
|
161
|
+
:query_params => query_params,
|
|
162
|
+
:form_params => form_params,
|
|
163
|
+
:body => post_body,
|
|
164
|
+
:auth_names => auth_names,
|
|
165
|
+
:return_type => return_type
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
169
|
+
if @api_client.config.debugging
|
|
170
|
+
@api_client.config.logger.debug "API called: ConversationsApi#list_conversation_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
171
|
+
end
|
|
172
|
+
return data, status_code, headers
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# List conversations
|
|
176
|
+
# Cursor-paginated list of message threads owned by the workspace. Backed by main vanio's `/api/threads/list` which keyset-paginates against `(last_message_at, id)` for constant per-page cost. Use `pagination.nextCursor` from one response as the `cursor` query param of the next request. Filters: `platform` (`airbnb`|`booking`|`vrbo`|`website`|`email`), `status` (`open`|`archived` — `archived` is a stable no-op until the bit lands on `message_threads`).
|
|
177
|
+
# @param [Hash] opts the optional parameters
|
|
178
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
179
|
+
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
180
|
+
# @option opts [Integer] :limit Max items per page. Hard cap is 100. (default to 20)
|
|
181
|
+
# @option opts [String] :platform Restrict to threads on a single channel.
|
|
182
|
+
# @option opts [String] :status Filter by archive status. `archived` currently always returns an empty page — kept for forward-compat.
|
|
183
|
+
# @return [ConversationListResponse]
|
|
184
|
+
def list_conversations(opts = {})
|
|
185
|
+
data, _status_code, _headers = list_conversations_with_http_info(opts)
|
|
186
|
+
data
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# List conversations
|
|
190
|
+
# Cursor-paginated list of message threads owned by the workspace. Backed by main vanio's `/api/threads/list` which keyset-paginates against `(last_message_at, id)` for constant per-page cost. Use `pagination.nextCursor` from one response as the `cursor` query param of the next request. Filters: `platform` (`airbnb`|`booking`|`vrbo`|`website`|`email`), `status` (`open`|`archived` — `archived` is a stable no-op until the bit lands on `message_threads`).
|
|
191
|
+
# @param [Hash] opts the optional parameters
|
|
192
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
193
|
+
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
194
|
+
# @option opts [Integer] :limit Max items per page. Hard cap is 100. (default to 20)
|
|
195
|
+
# @option opts [String] :platform Restrict to threads on a single channel.
|
|
196
|
+
# @option opts [String] :status Filter by archive status. `archived` currently always returns an empty page — kept for forward-compat.
|
|
197
|
+
# @return [Array<(ConversationListResponse, Integer, Hash)>] ConversationListResponse data, response status code and response headers
|
|
198
|
+
def list_conversations_with_http_info(opts = {})
|
|
199
|
+
if @api_client.config.debugging
|
|
200
|
+
@api_client.config.logger.debug 'Calling API: ConversationsApi.list_conversations ...'
|
|
201
|
+
end
|
|
202
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
203
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ConversationsApi.list_conversations, must be smaller than or equal to 100.'
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
207
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ConversationsApi.list_conversations, must be greater than or equal to 1.'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
allowable_values = ["airbnb", "booking", "vrbo", "website", "email"]
|
|
211
|
+
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
212
|
+
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
213
|
+
end
|
|
214
|
+
allowable_values = ["open", "archived"]
|
|
215
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
216
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
217
|
+
end
|
|
218
|
+
# resource path
|
|
219
|
+
local_var_path = '/v1/conversations'
|
|
220
|
+
|
|
221
|
+
# query parameters
|
|
222
|
+
query_params = opts[:query_params] || {}
|
|
223
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
224
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
225
|
+
query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
|
|
226
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
227
|
+
|
|
228
|
+
# header parameters
|
|
229
|
+
header_params = opts[:header_params] || {}
|
|
230
|
+
# HTTP header 'Accept' (if needed)
|
|
231
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
232
|
+
header_params[:'X-Schema'] = opts[:'x_schema'] if !opts[:'x_schema'].nil?
|
|
233
|
+
|
|
234
|
+
# form parameters
|
|
235
|
+
form_params = opts[:form_params] || {}
|
|
236
|
+
|
|
237
|
+
# http body (model)
|
|
238
|
+
post_body = opts[:debug_body]
|
|
239
|
+
|
|
240
|
+
# return_type
|
|
241
|
+
return_type = opts[:debug_return_type] || 'ConversationListResponse'
|
|
242
|
+
|
|
243
|
+
# auth_names
|
|
244
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
245
|
+
|
|
246
|
+
new_options = opts.merge(
|
|
247
|
+
:operation => :"ConversationsApi.list_conversations",
|
|
248
|
+
:header_params => header_params,
|
|
249
|
+
:query_params => query_params,
|
|
250
|
+
:form_params => form_params,
|
|
251
|
+
:body => post_body,
|
|
252
|
+
:auth_names => auth_names,
|
|
253
|
+
:return_type => return_type
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
257
|
+
if @api_client.config.debugging
|
|
258
|
+
@api_client.config.logger.debug "API called: ConversationsApi#list_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
259
|
+
end
|
|
260
|
+
return data, status_code, headers
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
end
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Repull API
|
|
3
|
+
|
|
4
|
+
#The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_test_YOUR_API_KEY ``` Sandbox keys start with `sk_test_`, production with `sk_live_`. ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `pro`, `enterprise`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resets_at` fields.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: ivan@vanio.ai
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Repull
|
|
16
|
+
class GuestsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get guest profile
|
|
23
|
+
# Returns the full guest profile — base list-row fields plus contacts, flags, notes, risk metadata, and reservation aggregates. Aggregates main vanio's `GuestService.getGuestProfile()` into the public Repull shape so SDK consumers don't have to learn the internal schema.
|
|
24
|
+
# @param id [Integer]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
27
|
+
# @return [GuestProfile]
|
|
28
|
+
def get_guest(id, opts = {})
|
|
29
|
+
data, _status_code, _headers = get_guest_with_http_info(id, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Get guest profile
|
|
34
|
+
# Returns the full guest profile — base list-row fields plus contacts, flags, notes, risk metadata, and reservation aggregates. Aggregates main vanio's `GuestService.getGuestProfile()` into the public Repull shape so SDK consumers don't have to learn the internal schema.
|
|
35
|
+
# @param id [Integer]
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
38
|
+
# @return [Array<(GuestProfile, Integer, Hash)>] GuestProfile data, response status code and response headers
|
|
39
|
+
def get_guest_with_http_info(id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: GuestsApi.get_guest ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling GuestsApi.get_guest"
|
|
46
|
+
end
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/v1/guests/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
49
|
+
|
|
50
|
+
# query parameters
|
|
51
|
+
query_params = opts[:query_params] || {}
|
|
52
|
+
|
|
53
|
+
# header parameters
|
|
54
|
+
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
57
|
+
header_params[:'X-Schema'] = opts[:'x_schema'] if !opts[:'x_schema'].nil?
|
|
58
|
+
|
|
59
|
+
# form parameters
|
|
60
|
+
form_params = opts[:form_params] || {}
|
|
61
|
+
|
|
62
|
+
# http body (model)
|
|
63
|
+
post_body = opts[:debug_body]
|
|
64
|
+
|
|
65
|
+
# return_type
|
|
66
|
+
return_type = opts[:debug_return_type] || 'GuestProfile'
|
|
67
|
+
|
|
68
|
+
# auth_names
|
|
69
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
70
|
+
|
|
71
|
+
new_options = opts.merge(
|
|
72
|
+
:operation => :"GuestsApi.get_guest",
|
|
73
|
+
:header_params => header_params,
|
|
74
|
+
:query_params => query_params,
|
|
75
|
+
:form_params => form_params,
|
|
76
|
+
:body => post_body,
|
|
77
|
+
:auth_names => auth_names,
|
|
78
|
+
:return_type => return_type
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: GuestsApi#get_guest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# List guests
|
|
89
|
+
# Cursor-paginated list of guests in the workspace. Walks `guests.id ASC` keyset for constant per-page cost regardless of how many guests the customer has. Use `pagination.nextCursor` from one response as the `cursor` query param of the next request. Filters: `q` (substring on name/email/phone), `has_reservation` (`true`|`false`), `listing_id` (restrict to guests with at least one reservation on that listing).
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
92
|
+
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
93
|
+
# @option opts [Integer] :limit Max items per page. Hard cap is 100. (default to 20)
|
|
94
|
+
# @option opts [String] :q Case-insensitive substring search on name, email, or phone.
|
|
95
|
+
# @option opts [Boolean] :has_reservation Restrict to guests that do (`true`) or do not (`false`) have any reservation on file.
|
|
96
|
+
# @option opts [Integer] :listing_id Restrict to guests with at least one reservation on the given internal Repull listing id.
|
|
97
|
+
# @return [GuestListResponse]
|
|
98
|
+
def list_guests(opts = {})
|
|
99
|
+
data, _status_code, _headers = list_guests_with_http_info(opts)
|
|
100
|
+
data
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# List guests
|
|
104
|
+
# Cursor-paginated list of guests in the workspace. Walks `guests.id ASC` keyset for constant per-page cost regardless of how many guests the customer has. Use `pagination.nextCursor` from one response as the `cursor` query param of the next request. Filters: `q` (substring on name/email/phone), `has_reservation` (`true`|`false`), `listing_id` (restrict to guests with at least one reservation on that listing).
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @option opts [String] :x_schema Apply a custom or built-in schema to transform the response. Built-in: `native` (default), `calry`, `calry-v1`. Custom: any schema name created via `POST /v1/schema/custom`. Unknown / inactive schema names fall back to `native`.
|
|
107
|
+
# @option opts [String] :cursor Opaque cursor returned in the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
108
|
+
# @option opts [Integer] :limit Max items per page. Hard cap is 100. (default to 20)
|
|
109
|
+
# @option opts [String] :q Case-insensitive substring search on name, email, or phone.
|
|
110
|
+
# @option opts [Boolean] :has_reservation Restrict to guests that do (`true`) or do not (`false`) have any reservation on file.
|
|
111
|
+
# @option opts [Integer] :listing_id Restrict to guests with at least one reservation on the given internal Repull listing id.
|
|
112
|
+
# @return [Array<(GuestListResponse, Integer, Hash)>] GuestListResponse data, response status code and response headers
|
|
113
|
+
def list_guests_with_http_info(opts = {})
|
|
114
|
+
if @api_client.config.debugging
|
|
115
|
+
@api_client.config.logger.debug 'Calling API: GuestsApi.list_guests ...'
|
|
116
|
+
end
|
|
117
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
118
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling GuestsApi.list_guests, must be smaller than or equal to 100.'
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
122
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling GuestsApi.list_guests, must be greater than or equal to 1.'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# resource path
|
|
126
|
+
local_var_path = '/v1/guests'
|
|
127
|
+
|
|
128
|
+
# query parameters
|
|
129
|
+
query_params = opts[:query_params] || {}
|
|
130
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
131
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
132
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
133
|
+
query_params[:'has_reservation'] = opts[:'has_reservation'] if !opts[:'has_reservation'].nil?
|
|
134
|
+
query_params[:'listingId'] = opts[:'listing_id'] if !opts[:'listing_id'].nil?
|
|
135
|
+
|
|
136
|
+
# header parameters
|
|
137
|
+
header_params = opts[:header_params] || {}
|
|
138
|
+
# HTTP header 'Accept' (if needed)
|
|
139
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
140
|
+
header_params[:'X-Schema'] = opts[:'x_schema'] if !opts[:'x_schema'].nil?
|
|
141
|
+
|
|
142
|
+
# form parameters
|
|
143
|
+
form_params = opts[:form_params] || {}
|
|
144
|
+
|
|
145
|
+
# http body (model)
|
|
146
|
+
post_body = opts[:debug_body]
|
|
147
|
+
|
|
148
|
+
# return_type
|
|
149
|
+
return_type = opts[:debug_return_type] || 'GuestListResponse'
|
|
150
|
+
|
|
151
|
+
# auth_names
|
|
152
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
153
|
+
|
|
154
|
+
new_options = opts.merge(
|
|
155
|
+
:operation => :"GuestsApi.list_guests",
|
|
156
|
+
:header_params => header_params,
|
|
157
|
+
:query_params => query_params,
|
|
158
|
+
:form_params => form_params,
|
|
159
|
+
:body => post_body,
|
|
160
|
+
:auth_names => auth_names,
|
|
161
|
+
:return_type => return_type
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
165
|
+
if @api_client.config.debugging
|
|
166
|
+
@api_client.config.logger.debug "API called: GuestsApi#list_guests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
167
|
+
end
|
|
168
|
+
return data, status_code, headers
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
end
|