repull 0.2.14 → 0.2.16
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 +1387 -152
- data/lib/repull/api/availability_api.rb +2 -2
- data/lib/repull/api/billing_api.rb +4 -4
- data/lib/repull/api/booking_com_api.rb +36 -27
- data/lib/repull/api/connect_api.rb +4 -4
- data/lib/repull/api/conversations_api.rb +398 -4
- data/lib/repull/api/guests_api.rb +2 -2
- data/lib/repull/api/listings_api.rb +97 -13
- data/lib/repull/api/reservations_api.rb +157 -6
- data/lib/repull/api/webhooks_api.rb +10 -3
- data/lib/repull/models/accept_reservation_request200_response.rb +321 -0
- data/lib/repull/models/account_created_event.rb +95 -31
- data/lib/repull/models/account_disconnected_event.rb +95 -31
- data/lib/repull/models/ai_operation_completed_event.rb +95 -31
- data/lib/repull/models/ai_operation_failed_event.rb +95 -31
- data/lib/repull/models/airbnb_account_freshness.rb +239 -0
- data/lib/repull/models/airbnb_alteration.rb +46 -2
- data/lib/repull/models/airbnb_alteration_create_request.rb +264 -0
- data/lib/repull/models/airbnb_connection.rb +69 -2
- data/lib/repull/models/airbnb_connection_host.rb +1 -1
- data/lib/repull/models/airbnb_content_write_response.rb +275 -0
- data/lib/repull/models/airbnb_data_freshness.rb +22 -10
- data/lib/repull/models/airbnb_description_write_request.rb +192 -0
- data/lib/repull/models/airbnb_description_write_request_description.rb +365 -0
- data/lib/repull/models/airbnb_listing.rb +12 -1
- data/lib/repull/models/airbnb_listing_action200_response.rb +105 -0
- data/lib/repull/models/airbnb_listing_action200_response_one_of.rb +157 -0
- data/lib/repull/models/airbnb_listing_action200_response_one_of1.rb +175 -0
- data/lib/repull/models/airbnb_listing_action_request.rb +2 -2
- data/lib/repull/models/airbnb_listing_details_response.rb +284 -0
- data/lib/repull/models/airbnb_listing_details_write_request.rb +209 -0
- data/lib/repull/models/airbnb_listing_details_write_request_check_in_option.rb +214 -0
- data/lib/repull/models/airbnb_listing_details_write_request_quiet_hours_inner.rb +190 -0
- data/lib/repull/models/airbnb_listing_lifecycle_response.rb +196 -0
- data/lib/repull/models/airbnb_permits_response.rb +163 -0
- data/lib/repull/models/airbnb_permits_response_cached_inner.rb +200 -0
- data/lib/repull/models/airbnb_permits_write_request.rb +176 -0
- data/lib/repull/models/airbnb_permits_write_request_permits_inner.rb +228 -0
- data/lib/repull/models/airbnb_permits_write_request_permits_inner_answers_inner.rb +198 -0
- data/lib/repull/models/airbnb_photo_position.rb +159 -0
- data/lib/repull/models/airbnb_publish_result.rb +263 -0
- data/lib/repull/models/airbnb_reservation.rb +23 -1
- data/lib/repull/models/{create_airbnb_alteration_request.rb → airbnb_reservation_action200_response.rb} +12 -50
- data/lib/repull/models/airbnb_reservation_action_request.rb +248 -0
- data/lib/repull/models/airbnb_reservation_list_response.rb +13 -4
- data/lib/repull/models/airbnb_review.rb +23 -1
- data/lib/repull/models/airbnb_review_list_response.rb +13 -4
- data/lib/repull/models/airbnb_safety_disclosure.rb +202 -0
- data/lib/repull/models/airbnb_safety_disclosures_response.rb +162 -0
- data/lib/repull/models/airbnb_safety_disclosures_write_request.rb +176 -0
- data/lib/repull/models/airbnb_thread.rb +23 -1
- data/lib/repull/models/airbnb_thread_list_response.rb +13 -4
- data/lib/repull/models/airbnb_transaction.rb +23 -1
- data/lib/repull/models/booking_availability_update.rb +4 -20
- data/lib/repull/models/booking_availability_update_date_range.rb +193 -0
- data/lib/repull/models/booking_availability_update_request.rb +14 -3
- data/lib/repull/models/booking_pricing_rate_update.rb +32 -4
- data/lib/repull/models/booking_pricing_rate_update_date_range.rb +3 -0
- data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +10 -10
- data/lib/repull/models/booking_pricing_response.rb +16 -4
- data/lib/repull/models/booking_pricing_update_response.rb +82 -18
- data/lib/repull/models/booking_property.rb +107 -36
- data/lib/repull/models/booking_property_listings_inner.rb +244 -0
- data/lib/repull/models/booking_rate_write_occupancy.rb +187 -0
- data/lib/repull/models/booking_rate_write_price_half.rb +188 -0
- data/lib/repull/models/booking_rate_write_restriction_half.rb +212 -0
- data/lib/repull/models/booking_rate_write_verification.rb +200 -0
- data/lib/repull/models/booking_rate_write_verification_row.rb +196 -0
- data/lib/repull/models/booking_restriction_request_row.rb +199 -0
- data/lib/repull/models/booking_restriction_verification.rb +208 -0
- data/lib/repull/models/booking_restriction_verification_row.rb +203 -0
- data/lib/repull/models/booking_restriction_verification_row_booking_value.rb +105 -0
- data/lib/repull/models/booking_restriction_verification_row_expected.rb +105 -0
- data/lib/repull/models/booking_rooms_rates_response.rb +41 -7
- data/lib/repull/models/booking_rooms_rates_response_rooms_inner.rb +12 -1
- data/lib/repull/models/booking_rooms_rates_response_rooms_inner_rates_inner.rb +1 -0
- data/lib/repull/models/booking_upstream_failure.rb +204 -0
- data/lib/repull/models/calendar_updated_event.rb +95 -31
- data/lib/repull/models/conversation_message_attachment.rb +28 -1
- data/lib/repull/models/create_airbnb_listing_room_request.rb +315 -0
- data/lib/repull/models/create_airbnb_offer_request.rb +93 -8
- data/lib/repull/models/create_airbnb_offer_request_guest_details.rb +279 -0
- data/lib/repull/models/create_conversation_special_offer201_response.rb +293 -0
- data/lib/repull/models/create_conversation_special_offer201_response_guests.rb +189 -0
- data/lib/repull/models/create_conversation_special_offer_request.rb +263 -0
- data/lib/repull/models/create_conversation_special_offer_request_guests.rb +263 -0
- data/lib/repull/models/decline_reservation_request_request.rb +234 -0
- data/lib/repull/models/delete_airbnb_listing_photo200_response.rb +14 -4
- data/lib/repull/models/delete_airbnb_listing_room200_response.rb +157 -0
- data/lib/repull/models/error_error.rb +31 -1
- data/lib/repull/models/get_airbnb_booking_settings200_response.rb +190 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data.rb +246 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_advance_notice.rb +172 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_booking_window.rb +160 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_cancellation.rb +203 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_cancellation_non_refundable.rb +218 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_check_in.rb +159 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_check_in_start.rb +104 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_check_out.rb +172 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_instant_book.rb +206 -0
- data/lib/repull/models/get_airbnb_booking_settings200_response_data_preparation_time.rb +173 -0
- data/lib/repull/models/get_airbnb_listing_details200_response.rb +192 -0
- data/lib/repull/models/get_airbnb_offer200_response.rb +289 -0
- data/lib/repull/models/get_usage_summary200_response.rb +10 -1
- data/lib/repull/models/get_usage_summary200_response_limits.rb +11 -1
- data/lib/repull/models/get_usage_summary200_response_remaining.rb +11 -1
- data/lib/repull/models/get_usage_summary200_response_used.rb +10 -1
- data/lib/repull/models/get_usage_tier200_response.rb +10 -1
- data/lib/repull/models/get_usage_tier200_response_limits.rb +11 -1
- data/lib/repull/models/get_usage_tier200_response_remaining.rb +11 -1
- data/lib/repull/models/get_usage_tier200_response_used.rb +10 -1
- data/lib/repull/models/inquiry_created_event.rb +281 -0
- data/lib/repull/models/inquiry_created_payload.rb +185 -0
- data/lib/repull/models/inquiry_updated_event.rb +281 -0
- data/lib/repull/models/inquiry_updated_payload.rb +213 -0
- data/lib/repull/models/inquiry_webhook_object.rb +323 -0
- data/lib/repull/models/inquiry_webhook_object_expected_payout.rb +158 -0
- data/lib/repull/models/inquiry_webhook_object_guests.rb +188 -0
- data/lib/repull/models/list_airbnb_listing_permits200_response.rb +190 -0
- data/lib/repull/models/list_airbnb_listing_safety_disclosures200_response.rb +190 -0
- data/lib/repull/models/list_airbnb_thread_messages200_response.rb +170 -0
- data/lib/repull/models/list_airbnb_thread_messages200_response_data_inner.rb +274 -0
- data/lib/repull/models/list_airbnb_thread_messages200_response_pagination.rb +158 -0
- data/lib/repull/models/list_inquiries200_response.rb +192 -0
- data/lib/repull/models/list_inquiries200_response_data_inner.rb +418 -0
- data/lib/repull/models/list_inquiries200_response_data_inner_expected_payout.rb +159 -0
- data/lib/repull/models/list_inquiries200_response_data_inner_guests.rb +188 -0
- data/lib/repull/models/listing.rb +2 -1
- data/lib/repull/models/listing_content.rb +13 -2
- data/lib/repull/models/listing_content_update_request.rb +21 -2
- data/lib/repull/models/listing_content_update_request_details.rb +206 -0
- data/lib/repull/models/listing_content_update_request_policies.rb +95 -5
- data/lib/repull/models/listing_content_update_response.rb +1 -1
- data/lib/repull/models/listing_created_event.rb +95 -31
- data/lib/repull/models/listing_deleted_event.rb +95 -31
- data/lib/repull/models/listing_deleted_payload.rb +55 -21
- data/lib/repull/models/listing_publish_airbnb_response.rb +165 -0
- data/lib/repull/models/listing_pull_airbnb_request.rb +149 -0
- data/lib/repull/models/listing_pull_response.rb +231 -0
- data/lib/repull/models/listing_reactivated_event.rb +281 -0
- data/lib/repull/models/listing_suspended_event.rb +281 -0
- data/lib/repull/models/listing_suspension_payload.rb +202 -0
- data/lib/repull/models/listing_updated_event.rb +95 -31
- data/lib/repull/models/listing_updated_payload.rb +50 -22
- data/lib/repull/models/listing_webhook_object.rb +291 -0
- data/lib/repull/models/listing_webhook_object_address.rb +168 -0
- data/lib/repull/models/listing_webhook_object_channels_inner.rb +184 -0
- data/lib/repull/models/message.rb +1 -0
- data/lib/repull/models/payment_completed_event.rb +95 -31
- data/lib/repull/models/payment_completed_payload.rb +46 -44
- data/lib/repull/models/payment_refunded_event.rb +95 -31
- data/lib/repull/models/payment_refunded_payload.rb +46 -44
- data/lib/repull/models/payment_webhook_object.rb +351 -0
- data/lib/repull/models/preapprove_conversation201_response.rb +253 -0
- data/lib/repull/models/preapprove_conversation_request.rb +150 -0
- data/lib/repull/models/publish_section_error.rb +232 -0
- data/lib/repull/models/reorder_airbnb_listing_photos200_response.rb +191 -0
- data/lib/repull/models/reorder_airbnb_listing_photos200_response_data.rb +172 -0
- data/lib/repull/models/reorder_airbnb_listing_photos_request.rb +185 -0
- data/lib/repull/models/replay_webhook_delivery_request.rb +150 -0
- data/lib/repull/models/repull_ping_event.rb +95 -31
- data/lib/repull/models/reservation.rb +44 -2
- data/lib/repull/models/reservation_alteration_created_event.rb +95 -31
- data/lib/repull/models/reservation_alteration_responded_event.rb +95 -31
- data/lib/repull/models/reservation_cancelled_event.rb +95 -31
- data/lib/repull/models/reservation_created_event.rb +95 -32
- data/lib/repull/models/reservation_message_received_event.rb +95 -31
- data/lib/repull/models/reservation_message_received_payload.rb +17 -4
- data/lib/repull/models/reservation_request_created_event.rb +281 -0
- data/lib/repull/models/reservation_request_created_payload.rb +224 -0
- data/lib/repull/models/reservation_request_updated_event.rb +281 -0
- data/lib/repull/models/reservation_request_updated_payload.rb +251 -0
- data/lib/repull/models/reservation_updated_event.rb +95 -31
- data/lib/repull/models/reservation_webhook_object.rb +38 -5
- data/lib/repull/models/review_created_event.rb +95 -31
- data/lib/repull/models/review_responded_event.rb +95 -31
- data/lib/repull/models/send_airbnb_message201_response.rb +104 -0
- data/lib/repull/models/send_airbnb_message_request.rb +4 -20
- data/lib/repull/models/send_message_attachment.rb +225 -0
- data/lib/repull/models/send_message_part.rb +201 -0
- data/lib/repull/models/send_message_request.rb +44 -19
- data/lib/repull/models/send_message_response.rb +29 -5
- data/lib/repull/models/sent_attachment.rb +196 -0
- data/lib/repull/models/set_airbnb_listing_cover_photo200_response.rb +191 -0
- data/lib/repull/models/set_airbnb_listing_cover_photo200_response_data.rb +171 -0
- data/lib/repull/models/set_airbnb_listing_cover_photo_request.rb +165 -0
- data/lib/repull/models/update_airbnb_booking_settings200_response.rb +164 -0
- data/lib/repull/models/update_airbnb_booking_settings200_response_data.rb +205 -0
- data/lib/repull/models/update_airbnb_booking_settings_request.rb +202 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_advance_notice.rb +183 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_booking_window.rb +183 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_cancellation.rb +201 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_cancellation_non_refundable.rb +183 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_check_in.rb +159 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_check_out.rb +182 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_instant_book.rb +203 -0
- data/lib/repull/models/update_airbnb_booking_settings_request_preparation_time.rb +182 -0
- data/lib/repull/models/update_airbnb_listing_amenities200_response.rb +191 -0
- data/lib/repull/models/update_airbnb_listing_amenities200_response_data.rb +158 -0
- data/lib/repull/models/update_airbnb_listing_amenities_request.rb +199 -0
- data/lib/repull/models/update_airbnb_listing_amenities_request_accessibility_amenities_inner.rb +246 -0
- data/lib/repull/models/update_airbnb_listing_amenities_request_amenities_inner.rb +218 -0
- data/lib/repull/models/update_airbnb_listing_permits200_response.rb +168 -0
- data/lib/repull/models/update_airbnb_listing_photo200_response.rb +194 -0
- data/lib/repull/models/update_airbnb_listing_photo_request.rb +242 -0
- data/lib/repull/models/update_airbnb_listing_room200_response.rb +194 -0
- data/lib/repull/models/update_airbnb_listing_room_request.rb +293 -0
- data/lib/repull/models/update_airbnb_listing_room_request_beds_inner.rb +209 -0
- data/lib/repull/models/update_airbnb_listing_room_request_room_amenities_inner.rb +182 -0
- data/lib/repull/models/update_airbnb_listing_room_request_room_amenities_inner_value.rb +105 -0
- data/lib/repull/models/update_airbnb_listing_safety_disclosures200_response.rb +180 -0
- data/lib/repull/models/upload_airbnb_listing_photos_request.rb +184 -0
- data/lib/repull/models/upload_airbnb_listing_photos_request_photos_inner.rb +305 -0
- data/lib/repull/models/upload_airbnb_listing_photos_request_photos_inner_listing_id.rb +105 -0
- data/lib/repull/models/usage_quota_warning_event.rb +281 -0
- data/lib/repull/models/usage_quota_warning_payload.rb +224 -0
- data/lib/repull/models/usage_quota_warning_payload_top_operation.rb +167 -0
- data/lib/repull/models/webhook_event.rb +17 -3
- data/lib/repull/models/webhook_event_account.rb +171 -0
- data/lib/repull/models/webhook_event_type.rb +8 -1
- data/lib/repull/models/withdraw_conversation_special_offer200_response.rb +240 -0
- data/lib/repull/version.rb +1 -1
- data/lib/repull.rb +138 -1
- data/openapi/v1.json +19578 -10662
- data/scripts/regen.sh +1 -1
- metadata +140 -3
|
@@ -0,0 +1,192 @@
|
|
|
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_live_YOUR_API_KEY ``` ## 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`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Repull
|
|
17
|
+
# Write one locale's copy. Airbnb keeps a separate description per locale, which is why the locale is explicit: writing Italian copy into the English row is how a translation gets lost. Only the fields you send are written.
|
|
18
|
+
class AirbnbDescriptionWriteRequest < ApiModelBase
|
|
19
|
+
# Language tag — `en`, `it`, `pt-BR`. `GET /v1/channels/airbnb/listings/{id}/settings?type=locales` lists the locales already synced for this listing.
|
|
20
|
+
attr_accessor :locale
|
|
21
|
+
|
|
22
|
+
attr_accessor :description
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'locale' => :'locale',
|
|
28
|
+
:'description' => :'description'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'locale' => :'String',
|
|
46
|
+
:'description' => :'AirbnbDescriptionWriteRequestDescription'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AirbnbDescriptionWriteRequest` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AirbnbDescriptionWriteRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'locale')
|
|
73
|
+
self.locale = attributes[:'locale']
|
|
74
|
+
else
|
|
75
|
+
self.locale = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'description')
|
|
79
|
+
self.description = attributes[:'description']
|
|
80
|
+
else
|
|
81
|
+
self.description = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @locale.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "locale", locale cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @description.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @locale.nil?
|
|
106
|
+
return false if @description.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] locale Value to be assigned
|
|
112
|
+
def locale=(locale)
|
|
113
|
+
if locale.nil?
|
|
114
|
+
fail ArgumentError, 'locale cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@locale = locale
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] description Value to be assigned
|
|
122
|
+
def description=(description)
|
|
123
|
+
if description.nil?
|
|
124
|
+
fail ArgumentError, 'description cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@description = description
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
locale == o.locale &&
|
|
136
|
+
description == o.description
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[locale, description].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
@@ -0,0 +1,365 @@
|
|
|
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_live_YOUR_API_KEY ``` ## 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`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | 50 | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Repull
|
|
17
|
+
# At least one field required. `description` itself is NOT accepted: Airbnb composes the public description from these sections and ignores a directly-supplied one, so accepting it would be taking a value and discarding it. An unknown field is refused by name rather than dropped.
|
|
18
|
+
class AirbnbDescriptionWriteRequestDescription < ApiModelBase
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# Airbnb hard-caps this at 500 characters and refuses the whole write if it is longer.
|
|
22
|
+
attr_accessor :summary
|
|
23
|
+
|
|
24
|
+
attr_accessor :space
|
|
25
|
+
|
|
26
|
+
attr_accessor :access
|
|
27
|
+
|
|
28
|
+
attr_accessor :interaction
|
|
29
|
+
|
|
30
|
+
attr_accessor :neighborhood_overview
|
|
31
|
+
|
|
32
|
+
attr_accessor :transit
|
|
33
|
+
|
|
34
|
+
attr_accessor :notes
|
|
35
|
+
|
|
36
|
+
attr_accessor :house_rules
|
|
37
|
+
|
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'name' => :'name',
|
|
42
|
+
:'summary' => :'summary',
|
|
43
|
+
:'space' => :'space',
|
|
44
|
+
:'access' => :'access',
|
|
45
|
+
:'interaction' => :'interaction',
|
|
46
|
+
:'neighborhood_overview' => :'neighborhood_overview',
|
|
47
|
+
:'transit' => :'transit',
|
|
48
|
+
:'notes' => :'notes',
|
|
49
|
+
:'house_rules' => :'house_rules'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Returns attribute mapping this model knows about
|
|
54
|
+
def self.acceptable_attribute_map
|
|
55
|
+
attribute_map
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Returns all the JSON keys this model knows about
|
|
59
|
+
def self.acceptable_attributes
|
|
60
|
+
acceptable_attribute_map.values
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute type mapping.
|
|
64
|
+
def self.openapi_types
|
|
65
|
+
{
|
|
66
|
+
:'name' => :'String',
|
|
67
|
+
:'summary' => :'String',
|
|
68
|
+
:'space' => :'String',
|
|
69
|
+
:'access' => :'String',
|
|
70
|
+
:'interaction' => :'String',
|
|
71
|
+
:'neighborhood_overview' => :'String',
|
|
72
|
+
:'transit' => :'String',
|
|
73
|
+
:'notes' => :'String',
|
|
74
|
+
:'house_rules' => :'String'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# List of attributes with nullable: true
|
|
79
|
+
def self.openapi_nullable
|
|
80
|
+
Set.new([
|
|
81
|
+
:'name',
|
|
82
|
+
:'summary',
|
|
83
|
+
:'space',
|
|
84
|
+
:'access',
|
|
85
|
+
:'interaction',
|
|
86
|
+
:'neighborhood_overview',
|
|
87
|
+
:'transit',
|
|
88
|
+
:'notes',
|
|
89
|
+
:'house_rules'
|
|
90
|
+
])
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Initializes the object
|
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
95
|
+
def initialize(attributes = {})
|
|
96
|
+
if (!attributes.is_a?(Hash))
|
|
97
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AirbnbDescriptionWriteRequestDescription` initialize method"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
101
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
103
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AirbnbDescriptionWriteRequestDescription`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
105
|
+
end
|
|
106
|
+
h[k.to_sym] = v
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'name')
|
|
110
|
+
self.name = attributes[:'name']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'summary')
|
|
114
|
+
self.summary = attributes[:'summary']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'space')
|
|
118
|
+
self.space = attributes[:'space']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'access')
|
|
122
|
+
self.access = attributes[:'access']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'interaction')
|
|
126
|
+
self.interaction = attributes[:'interaction']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'neighborhood_overview')
|
|
130
|
+
self.neighborhood_overview = attributes[:'neighborhood_overview']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'transit')
|
|
134
|
+
self.transit = attributes[:'transit']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'notes')
|
|
138
|
+
self.notes = attributes[:'notes']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'house_rules')
|
|
142
|
+
self.house_rules = attributes[:'house_rules']
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
147
|
+
# @return Array for valid properties with the reasons
|
|
148
|
+
def list_invalid_properties
|
|
149
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
150
|
+
invalid_properties = Array.new
|
|
151
|
+
if !@name.nil? && @name.to_s.length > 255
|
|
152
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if !@summary.nil? && @summary.to_s.length > 500
|
|
156
|
+
invalid_properties.push('invalid value for "summary", the character length must be smaller than or equal to 500.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if !@space.nil? && @space.to_s.length > 5000
|
|
160
|
+
invalid_properties.push('invalid value for "space", the character length must be smaller than or equal to 5000.')
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if !@access.nil? && @access.to_s.length > 5000
|
|
164
|
+
invalid_properties.push('invalid value for "access", the character length must be smaller than or equal to 5000.')
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if !@interaction.nil? && @interaction.to_s.length > 5000
|
|
168
|
+
invalid_properties.push('invalid value for "interaction", the character length must be smaller than or equal to 5000.')
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if !@neighborhood_overview.nil? && @neighborhood_overview.to_s.length > 5000
|
|
172
|
+
invalid_properties.push('invalid value for "neighborhood_overview", the character length must be smaller than or equal to 5000.')
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
if !@transit.nil? && @transit.to_s.length > 5000
|
|
176
|
+
invalid_properties.push('invalid value for "transit", the character length must be smaller than or equal to 5000.')
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if !@notes.nil? && @notes.to_s.length > 5000
|
|
180
|
+
invalid_properties.push('invalid value for "notes", the character length must be smaller than or equal to 5000.')
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if !@house_rules.nil? && @house_rules.to_s.length > 5000
|
|
184
|
+
invalid_properties.push('invalid value for "house_rules", the character length must be smaller than or equal to 5000.')
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
invalid_properties
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Check to see if the all the properties in the model are valid
|
|
191
|
+
# @return true if the model is valid
|
|
192
|
+
def valid?
|
|
193
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
194
|
+
return false if !@name.nil? && @name.to_s.length > 255
|
|
195
|
+
return false if !@summary.nil? && @summary.to_s.length > 500
|
|
196
|
+
return false if !@space.nil? && @space.to_s.length > 5000
|
|
197
|
+
return false if !@access.nil? && @access.to_s.length > 5000
|
|
198
|
+
return false if !@interaction.nil? && @interaction.to_s.length > 5000
|
|
199
|
+
return false if !@neighborhood_overview.nil? && @neighborhood_overview.to_s.length > 5000
|
|
200
|
+
return false if !@transit.nil? && @transit.to_s.length > 5000
|
|
201
|
+
return false if !@notes.nil? && @notes.to_s.length > 5000
|
|
202
|
+
return false if !@house_rules.nil? && @house_rules.to_s.length > 5000
|
|
203
|
+
true
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Custom attribute writer method with validation
|
|
207
|
+
# @param [Object] name Value to be assigned
|
|
208
|
+
def name=(name)
|
|
209
|
+
if !name.nil? && name.to_s.length > 255
|
|
210
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
@name = name
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Custom attribute writer method with validation
|
|
217
|
+
# @param [Object] summary Value to be assigned
|
|
218
|
+
def summary=(summary)
|
|
219
|
+
if !summary.nil? && summary.to_s.length > 500
|
|
220
|
+
fail ArgumentError, 'invalid value for "summary", the character length must be smaller than or equal to 500.'
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
@summary = summary
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Custom attribute writer method with validation
|
|
227
|
+
# @param [Object] space Value to be assigned
|
|
228
|
+
def space=(space)
|
|
229
|
+
if !space.nil? && space.to_s.length > 5000
|
|
230
|
+
fail ArgumentError, 'invalid value for "space", the character length must be smaller than or equal to 5000.'
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
@space = space
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Custom attribute writer method with validation
|
|
237
|
+
# @param [Object] access Value to be assigned
|
|
238
|
+
def access=(access)
|
|
239
|
+
if !access.nil? && access.to_s.length > 5000
|
|
240
|
+
fail ArgumentError, 'invalid value for "access", the character length must be smaller than or equal to 5000.'
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
@access = access
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Custom attribute writer method with validation
|
|
247
|
+
# @param [Object] interaction Value to be assigned
|
|
248
|
+
def interaction=(interaction)
|
|
249
|
+
if !interaction.nil? && interaction.to_s.length > 5000
|
|
250
|
+
fail ArgumentError, 'invalid value for "interaction", the character length must be smaller than or equal to 5000.'
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
@interaction = interaction
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Custom attribute writer method with validation
|
|
257
|
+
# @param [Object] neighborhood_overview Value to be assigned
|
|
258
|
+
def neighborhood_overview=(neighborhood_overview)
|
|
259
|
+
if !neighborhood_overview.nil? && neighborhood_overview.to_s.length > 5000
|
|
260
|
+
fail ArgumentError, 'invalid value for "neighborhood_overview", the character length must be smaller than or equal to 5000.'
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
@neighborhood_overview = neighborhood_overview
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Custom attribute writer method with validation
|
|
267
|
+
# @param [Object] transit Value to be assigned
|
|
268
|
+
def transit=(transit)
|
|
269
|
+
if !transit.nil? && transit.to_s.length > 5000
|
|
270
|
+
fail ArgumentError, 'invalid value for "transit", the character length must be smaller than or equal to 5000.'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
@transit = transit
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Custom attribute writer method with validation
|
|
277
|
+
# @param [Object] notes Value to be assigned
|
|
278
|
+
def notes=(notes)
|
|
279
|
+
if !notes.nil? && notes.to_s.length > 5000
|
|
280
|
+
fail ArgumentError, 'invalid value for "notes", the character length must be smaller than or equal to 5000.'
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
@notes = notes
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Custom attribute writer method with validation
|
|
287
|
+
# @param [Object] house_rules Value to be assigned
|
|
288
|
+
def house_rules=(house_rules)
|
|
289
|
+
if !house_rules.nil? && house_rules.to_s.length > 5000
|
|
290
|
+
fail ArgumentError, 'invalid value for "house_rules", the character length must be smaller than or equal to 5000.'
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
@house_rules = house_rules
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Checks equality by comparing each attribute.
|
|
297
|
+
# @param [Object] Object to be compared
|
|
298
|
+
def ==(o)
|
|
299
|
+
return true if self.equal?(o)
|
|
300
|
+
self.class == o.class &&
|
|
301
|
+
name == o.name &&
|
|
302
|
+
summary == o.summary &&
|
|
303
|
+
space == o.space &&
|
|
304
|
+
access == o.access &&
|
|
305
|
+
interaction == o.interaction &&
|
|
306
|
+
neighborhood_overview == o.neighborhood_overview &&
|
|
307
|
+
transit == o.transit &&
|
|
308
|
+
notes == o.notes &&
|
|
309
|
+
house_rules == o.house_rules
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# @see the `==` method
|
|
313
|
+
# @param [Object] Object to be compared
|
|
314
|
+
def eql?(o)
|
|
315
|
+
self == o
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
# Calculates hash code according to all attributes.
|
|
319
|
+
# @return [Integer] Hash code
|
|
320
|
+
def hash
|
|
321
|
+
[name, summary, space, access, interaction, neighborhood_overview, transit, notes, house_rules].hash
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Builds the object from hash
|
|
325
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
326
|
+
# @return [Object] Returns the model itself
|
|
327
|
+
def self.build_from_hash(attributes)
|
|
328
|
+
return nil unless attributes.is_a?(Hash)
|
|
329
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
330
|
+
transformed_hash = {}
|
|
331
|
+
openapi_types.each_pair do |key, type|
|
|
332
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
333
|
+
transformed_hash["#{key}"] = nil
|
|
334
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
335
|
+
# check to ensure the input is an array given that the attribute
|
|
336
|
+
# is documented as an array but the input is not
|
|
337
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
338
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
339
|
+
end
|
|
340
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
341
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
342
|
+
end
|
|
343
|
+
end
|
|
344
|
+
new(transformed_hash)
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
# Returns the object in the form of hash
|
|
348
|
+
# @return [Hash] Returns the object in the form of hash
|
|
349
|
+
def to_hash
|
|
350
|
+
hash = {}
|
|
351
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
352
|
+
value = self.send(attr)
|
|
353
|
+
if value.nil?
|
|
354
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
355
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
hash[param] = _to_hash(value)
|
|
359
|
+
end
|
|
360
|
+
hash
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
end
|
|
@@ -24,6 +24,9 @@ module Repull
|
|
|
24
24
|
|
|
25
25
|
attr_accessor :city
|
|
26
26
|
|
|
27
|
+
# Cover photo URL for the Vanio listing. **Only present when the caller passes `?include=thumbnail`.** `null` when the listing has no cover photo stored — the listing is still returned.
|
|
28
|
+
attr_accessor :thumbnail_url
|
|
29
|
+
|
|
27
30
|
attr_accessor :connections
|
|
28
31
|
|
|
29
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -32,6 +35,7 @@ module Repull
|
|
|
32
35
|
:'listing_id' => :'listingId',
|
|
33
36
|
:'name' => :'name',
|
|
34
37
|
:'city' => :'city',
|
|
38
|
+
:'thumbnail_url' => :'thumbnailUrl',
|
|
35
39
|
:'connections' => :'connections'
|
|
36
40
|
}
|
|
37
41
|
end
|
|
@@ -52,6 +56,7 @@ module Repull
|
|
|
52
56
|
:'listing_id' => :'String',
|
|
53
57
|
:'name' => :'String',
|
|
54
58
|
:'city' => :'String',
|
|
59
|
+
:'thumbnail_url' => :'String',
|
|
55
60
|
:'connections' => :'Array<AirbnbConnection>'
|
|
56
61
|
}
|
|
57
62
|
end
|
|
@@ -60,6 +65,7 @@ module Repull
|
|
|
60
65
|
def self.openapi_nullable
|
|
61
66
|
Set.new([
|
|
62
67
|
:'city',
|
|
68
|
+
:'thumbnail_url',
|
|
63
69
|
])
|
|
64
70
|
end
|
|
65
71
|
|
|
@@ -91,6 +97,10 @@ module Repull
|
|
|
91
97
|
self.city = attributes[:'city']
|
|
92
98
|
end
|
|
93
99
|
|
|
100
|
+
if attributes.key?(:'thumbnail_url')
|
|
101
|
+
self.thumbnail_url = attributes[:'thumbnail_url']
|
|
102
|
+
end
|
|
103
|
+
|
|
94
104
|
if attributes.key?(:'connections')
|
|
95
105
|
if (value = attributes[:'connections']).is_a?(Array)
|
|
96
106
|
self.connections = value
|
|
@@ -121,6 +131,7 @@ module Repull
|
|
|
121
131
|
listing_id == o.listing_id &&
|
|
122
132
|
name == o.name &&
|
|
123
133
|
city == o.city &&
|
|
134
|
+
thumbnail_url == o.thumbnail_url &&
|
|
124
135
|
connections == o.connections
|
|
125
136
|
end
|
|
126
137
|
|
|
@@ -133,7 +144,7 @@ module Repull
|
|
|
133
144
|
# Calculates hash code according to all attributes.
|
|
134
145
|
# @return [Integer] Hash code
|
|
135
146
|
def hash
|
|
136
|
-
[listing_id, name, city, connections].hash
|
|
147
|
+
[listing_id, name, city, thumbnail_url, connections].hash
|
|
137
148
|
end
|
|
138
149
|
|
|
139
150
|
# Builds the object from hash
|