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,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_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
|
+
# A publish is not one call to Airbnb: it is up to eight independent ones (details, description, amenities, rooms, policies, photos, pricing, checkout_tasks), each of which can fail on its own. A PARTIAL publish is normal — what succeeded stays applied; there is no rollback.
|
|
18
|
+
class AirbnbPublishResult < ApiModelBase
|
|
19
|
+
# True only when EVERY attempted section reached Airbnb.
|
|
20
|
+
attr_accessor :published
|
|
21
|
+
|
|
22
|
+
# Sections that landed on Airbnb.
|
|
23
|
+
attr_accessor :sections
|
|
24
|
+
|
|
25
|
+
# Per-section failures. Empty when `published` is true.
|
|
26
|
+
attr_accessor :errors
|
|
27
|
+
|
|
28
|
+
# Set when the publish never started at all (no connection, address missing, subscription gate).
|
|
29
|
+
attr_accessor :reason
|
|
30
|
+
|
|
31
|
+
# Fields Airbnb will not let this listing change — collected from the failures above and from the `locked_attributes` Airbnb recorded for the listing. Sending them again returns success and changes nothing.
|
|
32
|
+
attr_accessor :locked_fields
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'published' => :'published',
|
|
38
|
+
:'sections' => :'sections',
|
|
39
|
+
:'errors' => :'errors',
|
|
40
|
+
:'reason' => :'reason',
|
|
41
|
+
:'locked_fields' => :'lockedFields'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns attribute mapping this model knows about
|
|
46
|
+
def self.acceptable_attribute_map
|
|
47
|
+
attribute_map
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Returns all the JSON keys this model knows about
|
|
51
|
+
def self.acceptable_attributes
|
|
52
|
+
acceptable_attribute_map.values
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Attribute type mapping.
|
|
56
|
+
def self.openapi_types
|
|
57
|
+
{
|
|
58
|
+
:'published' => :'Boolean',
|
|
59
|
+
:'sections' => :'Array<String>',
|
|
60
|
+
:'errors' => :'Array<PublishSectionError>',
|
|
61
|
+
:'reason' => :'String',
|
|
62
|
+
:'locked_fields' => :'Array<String>'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# List of attributes with nullable: true
|
|
67
|
+
def self.openapi_nullable
|
|
68
|
+
Set.new([
|
|
69
|
+
])
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Initializes the object
|
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
74
|
+
def initialize(attributes = {})
|
|
75
|
+
if (!attributes.is_a?(Hash))
|
|
76
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AirbnbPublishResult` initialize method"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
80
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AirbnbPublishResult`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'published')
|
|
89
|
+
self.published = attributes[:'published']
|
|
90
|
+
else
|
|
91
|
+
self.published = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'sections')
|
|
95
|
+
if (value = attributes[:'sections']).is_a?(Array)
|
|
96
|
+
self.sections = value
|
|
97
|
+
end
|
|
98
|
+
else
|
|
99
|
+
self.sections = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'errors')
|
|
103
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
|
104
|
+
self.errors = value
|
|
105
|
+
end
|
|
106
|
+
else
|
|
107
|
+
self.errors = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'reason')
|
|
111
|
+
self.reason = attributes[:'reason']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'locked_fields')
|
|
115
|
+
if (value = attributes[:'locked_fields']).is_a?(Array)
|
|
116
|
+
self.locked_fields = value
|
|
117
|
+
end
|
|
118
|
+
else
|
|
119
|
+
self.locked_fields = nil
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
124
|
+
# @return Array for valid properties with the reasons
|
|
125
|
+
def list_invalid_properties
|
|
126
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
127
|
+
invalid_properties = Array.new
|
|
128
|
+
if @published.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "published", published cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if @sections.nil?
|
|
133
|
+
invalid_properties.push('invalid value for "sections", sections cannot be nil.')
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if @errors.nil?
|
|
137
|
+
invalid_properties.push('invalid value for "errors", errors cannot be nil.')
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if @locked_fields.nil?
|
|
141
|
+
invalid_properties.push('invalid value for "locked_fields", locked_fields cannot be nil.')
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
invalid_properties
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Check to see if the all the properties in the model are valid
|
|
148
|
+
# @return true if the model is valid
|
|
149
|
+
def valid?
|
|
150
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
151
|
+
return false if @published.nil?
|
|
152
|
+
return false if @sections.nil?
|
|
153
|
+
return false if @errors.nil?
|
|
154
|
+
return false if @locked_fields.nil?
|
|
155
|
+
true
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Custom attribute writer method with validation
|
|
159
|
+
# @param [Object] published Value to be assigned
|
|
160
|
+
def published=(published)
|
|
161
|
+
if published.nil?
|
|
162
|
+
fail ArgumentError, 'published cannot be nil'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
@published = published
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Custom attribute writer method with validation
|
|
169
|
+
# @param [Object] sections Value to be assigned
|
|
170
|
+
def sections=(sections)
|
|
171
|
+
if sections.nil?
|
|
172
|
+
fail ArgumentError, 'sections cannot be nil'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
@sections = sections
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Custom attribute writer method with validation
|
|
179
|
+
# @param [Object] errors Value to be assigned
|
|
180
|
+
def errors=(errors)
|
|
181
|
+
if errors.nil?
|
|
182
|
+
fail ArgumentError, 'errors cannot be nil'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@errors = errors
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Custom attribute writer method with validation
|
|
189
|
+
# @param [Object] locked_fields Value to be assigned
|
|
190
|
+
def locked_fields=(locked_fields)
|
|
191
|
+
if locked_fields.nil?
|
|
192
|
+
fail ArgumentError, 'locked_fields cannot be nil'
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
@locked_fields = locked_fields
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Checks equality by comparing each attribute.
|
|
199
|
+
# @param [Object] Object to be compared
|
|
200
|
+
def ==(o)
|
|
201
|
+
return true if self.equal?(o)
|
|
202
|
+
self.class == o.class &&
|
|
203
|
+
published == o.published &&
|
|
204
|
+
sections == o.sections &&
|
|
205
|
+
errors == o.errors &&
|
|
206
|
+
reason == o.reason &&
|
|
207
|
+
locked_fields == o.locked_fields
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# @see the `==` method
|
|
211
|
+
# @param [Object] Object to be compared
|
|
212
|
+
def eql?(o)
|
|
213
|
+
self == o
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Calculates hash code according to all attributes.
|
|
217
|
+
# @return [Integer] Hash code
|
|
218
|
+
def hash
|
|
219
|
+
[published, sections, errors, reason, locked_fields].hash
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Builds the object from hash
|
|
223
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
224
|
+
# @return [Object] Returns the model itself
|
|
225
|
+
def self.build_from_hash(attributes)
|
|
226
|
+
return nil unless attributes.is_a?(Hash)
|
|
227
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
228
|
+
transformed_hash = {}
|
|
229
|
+
openapi_types.each_pair do |key, type|
|
|
230
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
231
|
+
transformed_hash["#{key}"] = nil
|
|
232
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
233
|
+
# check to ensure the input is an array given that the attribute
|
|
234
|
+
# is documented as an array but the input is not
|
|
235
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
236
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
237
|
+
end
|
|
238
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
239
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
new(transformed_hash)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Returns the object in the form of hash
|
|
246
|
+
# @return [Hash] Returns the object in the form of hash
|
|
247
|
+
def to_hash
|
|
248
|
+
hash = {}
|
|
249
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
250
|
+
value = self.send(attr)
|
|
251
|
+
if value.nil?
|
|
252
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
253
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
hash[param] = _to_hash(value)
|
|
257
|
+
end
|
|
258
|
+
hash
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
end
|
|
@@ -20,6 +20,12 @@ module Repull
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :listing_id
|
|
22
22
|
|
|
23
|
+
# Which connected Airbnb account this row belongs to — the Airbnb host id, as a string (they exceed 2^53). The same value `?account_id=` accepts and `GET /v1/connect/airbnb` returns as `accounts[].externalAccountId`.
|
|
24
|
+
attr_accessor :account_id
|
|
25
|
+
|
|
26
|
+
# Display name of that connected Airbnb account.
|
|
27
|
+
attr_accessor :account_name
|
|
28
|
+
|
|
23
29
|
attr_accessor :status
|
|
24
30
|
|
|
25
31
|
attr_accessor :check_in
|
|
@@ -39,6 +45,8 @@ module Repull
|
|
|
39
45
|
{
|
|
40
46
|
:'confirmation_code' => :'confirmationCode',
|
|
41
47
|
:'listing_id' => :'listingId',
|
|
48
|
+
:'account_id' => :'accountId',
|
|
49
|
+
:'account_name' => :'accountName',
|
|
42
50
|
:'status' => :'status',
|
|
43
51
|
:'check_in' => :'checkIn',
|
|
44
52
|
:'check_out' => :'checkOut',
|
|
@@ -64,6 +72,8 @@ module Repull
|
|
|
64
72
|
{
|
|
65
73
|
:'confirmation_code' => :'String',
|
|
66
74
|
:'listing_id' => :'String',
|
|
75
|
+
:'account_id' => :'String',
|
|
76
|
+
:'account_name' => :'String',
|
|
67
77
|
:'status' => :'String',
|
|
68
78
|
:'check_in' => :'Date',
|
|
69
79
|
:'check_out' => :'Date',
|
|
@@ -77,6 +87,8 @@ module Repull
|
|
|
77
87
|
# List of attributes with nullable: true
|
|
78
88
|
def self.openapi_nullable
|
|
79
89
|
Set.new([
|
|
90
|
+
:'account_id',
|
|
91
|
+
:'account_name',
|
|
80
92
|
:'guest_name',
|
|
81
93
|
:'guest_count',
|
|
82
94
|
:'total_price',
|
|
@@ -108,6 +120,14 @@ module Repull
|
|
|
108
120
|
self.listing_id = attributes[:'listing_id']
|
|
109
121
|
end
|
|
110
122
|
|
|
123
|
+
if attributes.key?(:'account_id')
|
|
124
|
+
self.account_id = attributes[:'account_id']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'account_name')
|
|
128
|
+
self.account_name = attributes[:'account_name']
|
|
129
|
+
end
|
|
130
|
+
|
|
111
131
|
if attributes.key?(:'status')
|
|
112
132
|
self.status = attributes[:'status']
|
|
113
133
|
end
|
|
@@ -159,6 +179,8 @@ module Repull
|
|
|
159
179
|
self.class == o.class &&
|
|
160
180
|
confirmation_code == o.confirmation_code &&
|
|
161
181
|
listing_id == o.listing_id &&
|
|
182
|
+
account_id == o.account_id &&
|
|
183
|
+
account_name == o.account_name &&
|
|
162
184
|
status == o.status &&
|
|
163
185
|
check_in == o.check_in &&
|
|
164
186
|
check_out == o.check_out &&
|
|
@@ -177,7 +199,7 @@ module Repull
|
|
|
177
199
|
# Calculates hash code according to all attributes.
|
|
178
200
|
# @return [Integer] Hash code
|
|
179
201
|
def hash
|
|
180
|
-
[confirmation_code, listing_id, status, check_in, check_out, guest_name, guest_count, total_price, currency].hash
|
|
202
|
+
[confirmation_code, listing_id, account_id, account_name, status, check_in, check_out, guest_name, guest_count, total_price, currency].hash
|
|
181
203
|
end
|
|
182
204
|
|
|
183
205
|
# Builds the object from hash
|
|
@@ -14,26 +14,17 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Repull
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
# Airbnb's reservation object. Re-read `GET /v1/channels/airbnb/reservations/{code}` for the mirrored row once Airbnb's notification lands.
|
|
18
|
+
class AirbnbReservationAction200Response < ApiModelBase
|
|
19
19
|
attr_accessor :confirmation_code
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
attr_accessor :check_in
|
|
23
|
-
|
|
24
|
-
# New check-out date (YYYY-MM-DD).
|
|
25
|
-
attr_accessor :check_out
|
|
26
|
-
|
|
27
|
-
# New guest count.
|
|
28
|
-
attr_accessor :number_of_guests
|
|
21
|
+
attr_accessor :status_type
|
|
29
22
|
|
|
30
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
24
|
def self.attribute_map
|
|
32
25
|
{
|
|
33
|
-
:'confirmation_code' => :'
|
|
34
|
-
:'
|
|
35
|
-
:'check_out' => :'check_out',
|
|
36
|
-
:'number_of_guests' => :'number_of_guests'
|
|
26
|
+
:'confirmation_code' => :'confirmationCode',
|
|
27
|
+
:'status_type' => :'statusType'
|
|
37
28
|
}
|
|
38
29
|
end
|
|
39
30
|
|
|
@@ -51,9 +42,7 @@ module Repull
|
|
|
51
42
|
def self.openapi_types
|
|
52
43
|
{
|
|
53
44
|
:'confirmation_code' => :'String',
|
|
54
|
-
:'
|
|
55
|
-
:'check_out' => :'Date',
|
|
56
|
-
:'number_of_guests' => :'Integer'
|
|
45
|
+
:'status_type' => :'String'
|
|
57
46
|
}
|
|
58
47
|
end
|
|
59
48
|
|
|
@@ -67,34 +56,24 @@ module Repull
|
|
|
67
56
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
57
|
def initialize(attributes = {})
|
|
69
58
|
if (!attributes.is_a?(Hash))
|
|
70
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::AirbnbReservationAction200Response` initialize method"
|
|
71
60
|
end
|
|
72
61
|
|
|
73
62
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
63
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
65
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::AirbnbReservationAction200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
67
|
end
|
|
79
68
|
h[k.to_sym] = v
|
|
80
69
|
}
|
|
81
70
|
|
|
82
71
|
if attributes.key?(:'confirmation_code')
|
|
83
72
|
self.confirmation_code = attributes[:'confirmation_code']
|
|
84
|
-
else
|
|
85
|
-
self.confirmation_code = nil
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
if attributes.key?(:'check_in')
|
|
89
|
-
self.check_in = attributes[:'check_in']
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
if attributes.key?(:'check_out')
|
|
93
|
-
self.check_out = attributes[:'check_out']
|
|
94
73
|
end
|
|
95
74
|
|
|
96
|
-
if attributes.key?(:'
|
|
97
|
-
self.
|
|
75
|
+
if attributes.key?(:'status_type')
|
|
76
|
+
self.status_type = attributes[:'status_type']
|
|
98
77
|
end
|
|
99
78
|
end
|
|
100
79
|
|
|
@@ -103,10 +82,6 @@ module Repull
|
|
|
103
82
|
def list_invalid_properties
|
|
104
83
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
105
84
|
invalid_properties = Array.new
|
|
106
|
-
if @confirmation_code.nil?
|
|
107
|
-
invalid_properties.push('invalid value for "confirmation_code", confirmation_code cannot be nil.')
|
|
108
|
-
end
|
|
109
|
-
|
|
110
85
|
invalid_properties
|
|
111
86
|
end
|
|
112
87
|
|
|
@@ -114,29 +89,16 @@ module Repull
|
|
|
114
89
|
# @return true if the model is valid
|
|
115
90
|
def valid?
|
|
116
91
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
117
|
-
return false if @confirmation_code.nil?
|
|
118
92
|
true
|
|
119
93
|
end
|
|
120
94
|
|
|
121
|
-
# Custom attribute writer method with validation
|
|
122
|
-
# @param [Object] confirmation_code Value to be assigned
|
|
123
|
-
def confirmation_code=(confirmation_code)
|
|
124
|
-
if confirmation_code.nil?
|
|
125
|
-
fail ArgumentError, 'confirmation_code cannot be nil'
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
@confirmation_code = confirmation_code
|
|
129
|
-
end
|
|
130
|
-
|
|
131
95
|
# Checks equality by comparing each attribute.
|
|
132
96
|
# @param [Object] Object to be compared
|
|
133
97
|
def ==(o)
|
|
134
98
|
return true if self.equal?(o)
|
|
135
99
|
self.class == o.class &&
|
|
136
100
|
confirmation_code == o.confirmation_code &&
|
|
137
|
-
|
|
138
|
-
check_out == o.check_out &&
|
|
139
|
-
number_of_guests == o.number_of_guests
|
|
101
|
+
status_type == o.status_type
|
|
140
102
|
end
|
|
141
103
|
|
|
142
104
|
# @see the `==` method
|
|
@@ -148,7 +110,7 @@ module Repull
|
|
|
148
110
|
# Calculates hash code according to all attributes.
|
|
149
111
|
# @return [Integer] Hash code
|
|
150
112
|
def hash
|
|
151
|
-
[confirmation_code,
|
|
113
|
+
[confirmation_code, status_type].hash
|
|
152
114
|
end
|
|
153
115
|
|
|
154
116
|
# Builds the object from hash
|