repull 0.2.10 → 0.2.15
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/README.md +2 -2
- data/lib/repull/api/airbnb_api.rb +1569 -196
- data/lib/repull/api/atlas_api.rb +5 -5
- data/lib/repull/api/availability_api.rb +145 -3
- data/lib/repull/api/billing_api.rb +7 -7
- data/lib/repull/api/booking_com_api.rb +210 -54
- data/lib/repull/api/connect_api.rb +763 -10
- data/lib/repull/api/conversations_api.rb +92 -11
- data/lib/repull/api/guests_api.rb +82 -7
- data/lib/repull/api/health_api.rb +318 -0
- data/lib/repull/api/kv_api.rb +1 -1
- data/lib/repull/api/listings_api.rb +392 -29
- data/lib/repull/api/markets_api.rb +3 -3
- data/lib/repull/api/plumguide_api.rb +19 -11
- data/lib/repull/api/pricing_api.rb +15 -15
- data/lib/repull/api/properties_api.rb +12 -9
- data/lib/repull/api/quotes_api.rb +109 -0
- data/lib/repull/api/reservations_api.rb +166 -7
- data/lib/repull/api/reviews_api.rb +81 -7
- data/lib/repull/api/schema_api.rb +1 -1
- data/lib/repull/api/system_api.rb +1 -1
- data/lib/repull/api/vrbo_api.rb +10 -10
- data/lib/repull/api/webhooks_api.rb +11 -9
- data/lib/repull/api_client.rb +1 -1
- data/lib/repull/api_error.rb +1 -1
- data/lib/repull/api_model_base.rb +1 -1
- data/lib/repull/configuration.rb +1 -1
- data/lib/repull/models/account_created_event.rb +1 -1
- data/lib/repull/models/account_created_payload.rb +1 -1
- data/lib/repull/models/account_disconnected_event.rb +1 -1
- data/lib/repull/models/account_disconnected_payload.rb +1 -1
- data/lib/repull/models/acknowledge_booking_reservations_request.rb +1 -1
- data/lib/repull/models/ai_operation.rb +1 -1
- data/lib/repull/models/ai_operation_completed_event.rb +1 -1
- data/lib/repull/models/ai_operation_completed_payload.rb +1 -1
- data/lib/repull/models/ai_operation_failed_event.rb +1 -1
- data/lib/repull/models/ai_operation_failed_payload.rb +1 -1
- data/lib/repull/models/ai_operation_failed_payload_error.rb +1 -1
- data/lib/repull/models/airbnb_account_freshness.rb +239 -0
- data/lib/repull/models/airbnb_alteration.rb +198 -10
- data/lib/repull/models/airbnb_alteration_create_request.rb +264 -0
- data/lib/repull/models/airbnb_amenity.rb +1 -1
- data/lib/repull/models/airbnb_availability_write_request.rb +20 -1
- data/lib/repull/models/airbnb_calendar_operation.rb +97 -8
- data/lib/repull/models/airbnb_connection.rb +73 -6
- data/lib/repull/models/airbnb_connection_accessibility_amenities_inner.rb +1 -1
- data/lib/repull/models/airbnb_connection_amenities_inner.rb +1 -1
- data/lib/repull/models/airbnb_connection_host.rb +2 -2
- data/lib/repull/models/airbnb_connection_response.rb +1 -1
- data/lib/repull/models/airbnb_connection_summary.rb +1 -1
- data/lib/repull/models/airbnb_content_write_response.rb +275 -0
- data/lib/repull/models/airbnb_data_freshness.rb +24 -12
- 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 +14 -3
- 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 +3 -3
- 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_listing_list_response.rb +2 -2
- 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_pricing_write_request.rb +54 -3
- data/lib/repull/models/airbnb_pricing_write_request_records_inner.rb +236 -0
- data/lib/repull/models/airbnb_publish_result.rb +263 -0
- data/lib/repull/models/airbnb_reservation.rb +24 -2
- data/lib/repull/models/airbnb_reservation_list_response.rb +15 -6
- data/lib/repull/models/airbnb_review.rb +24 -2
- data/lib/repull/models/airbnb_review_list_response.rb +14 -5
- 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 +24 -2
- data/lib/repull/models/airbnb_thread_list_response.rb +14 -5
- data/lib/repull/models/airbnb_transaction.rb +524 -0
- data/lib/repull/models/airbnb_transaction_guest_breakdown.rb +171 -0
- data/lib/repull/models/airbnb_transaction_host_breakdown.rb +246 -0
- data/lib/repull/models/airbnb_transaction_payout.rb +175 -0
- data/lib/repull/models/alteration_change.rb +161 -0
- data/lib/repull/models/alteration_webhook_object.rb +296 -0
- data/lib/repull/models/availability_batch_write_request.rb +296 -0
- data/lib/repull/models/availability_write_request.rb +259 -0
- data/lib/repull/models/availability_write_result.rb +178 -0
- data/lib/repull/models/availability_write_result_synced.rb +176 -0
- data/lib/repull/models/availability_write_settings.rb +215 -0
- data/lib/repull/models/booking_availability_state_response.rb +149 -0
- data/lib/repull/models/booking_availability_update.rb +1 -1
- data/lib/repull/models/booking_availability_update_request.rb +1 -1
- data/lib/repull/models/booking_availability_update_request_property_id.rb +1 -1
- data/lib/repull/models/booking_availability_update_request_updates_inner.rb +1 -1
- data/lib/repull/models/booking_connect_listing_option.rb +1 -1
- data/lib/repull/models/booking_connect_room.rb +1 -1
- data/lib/repull/models/booking_connect_rooms_response.rb +39 -5
- data/lib/repull/models/booking_conversation.rb +1 -1
- data/lib/repull/models/booking_pricing_rate_update.rb +1 -1
- data/lib/repull/models/booking_pricing_rate_update_date_range.rb +1 -1
- data/lib/repull/models/booking_pricing_rate_update_restrictions.rb +1 -1
- data/lib/repull/models/booking_pricing_response.rb +1 -1
- data/lib/repull/models/booking_pricing_update_request.rb +1 -1
- data/lib/repull/models/booking_pricing_update_response.rb +1 -1
- data/lib/repull/models/booking_property.rb +1 -1
- data/lib/repull/models/booking_reservation.rb +277 -0
- data/lib/repull/models/booking_reservation_room.rb +271 -0
- data/lib/repull/models/booking_room_mapping.rb +18 -8
- data/lib/repull/models/booking_rooms_rates_response.rb +170 -0
- data/lib/repull/models/booking_rooms_rates_response_rooms_inner.rb +170 -0
- data/lib/repull/models/booking_rooms_rates_response_rooms_inner_rates_inner.rb +212 -0
- data/lib/repull/models/booking_setup_request.rb +1 -1
- data/lib/repull/models/booking_verify_hotel_request.rb +1 -1
- data/lib/repull/models/booking_verify_hotel_response.rb +40 -6
- data/lib/repull/models/bulk_pricing_failure.rb +1 -1
- data/lib/repull/models/bulk_pricing_item.rb +1 -1
- data/lib/repull/models/bulk_pricing_request.rb +1 -1
- data/lib/repull/models/bulk_pricing_response.rb +1 -1
- data/lib/repull/models/calendar_day.rb +1 -1
- data/lib/repull/models/calendar_response.rb +1 -1
- data/lib/repull/models/calendar_updated_event.rb +1 -1
- data/lib/repull/models/calendar_updated_payload.rb +1 -1
- data/lib/repull/models/calendar_updated_payload_range.rb +1 -1
- data/lib/repull/models/clear_kv200_response.rb +1 -1
- data/lib/repull/models/connect_host.rb +1 -1
- data/lib/repull/models/connect_provider.rb +1 -1
- data/lib/repull/models/connect_provider_list_response.rb +1 -1
- data/lib/repull/models/connect_session.rb +1 -1
- data/lib/repull/models/connect_status.rb +18 -6
- data/lib/repull/models/connect_status_accounts_inner.rb +188 -0
- data/lib/repull/models/connection.rb +1 -1
- data/lib/repull/models/connection_list_response.rb +1 -1
- data/lib/repull/models/conversation.rb +13 -2
- data/lib/repull/models/conversation_detail.rb +13 -2
- data/lib/repull/models/conversation_guest.rb +1 -1
- data/lib/repull/models/conversation_guest_contact.rb +1 -1
- data/lib/repull/models/conversation_host.rb +1 -1
- data/lib/repull/models/conversation_list_response.rb +1 -1
- data/lib/repull/models/conversation_message_attachment.rb +1 -1
- data/lib/repull/models/create_airbnb_listing_room_request.rb +315 -0
- data/lib/repull/models/create_airbnb_offer_request.rb +1 -1
- data/lib/repull/models/create_billing_checkout_request.rb +1 -1
- data/lib/repull/models/create_booking_webhook_request.rb +1 -1
- data/lib/repull/models/create_connect_session_request.rb +1 -1
- data/lib/repull/models/create_connection_request.rb +2 -2
- data/lib/repull/models/create_webhook_request.rb +1 -1
- data/lib/repull/models/custom_schema.rb +1 -1
- data/lib/repull/models/custom_schema_create.rb +1 -1
- data/lib/repull/models/custom_schema_create_response.rb +1 -1
- data/lib/repull/models/custom_schema_delete_response.rb +1 -1
- data/lib/repull/models/custom_schema_list_response.rb +1 -1
- data/lib/repull/models/custom_schema_summary.rb +1 -1
- data/lib/repull/models/custom_schema_update.rb +1 -1
- data/lib/repull/models/delete_airbnb_listing_photo200_response.rb +15 -5
- data/lib/repull/models/delete_airbnb_listing_room200_response.rb +157 -0
- data/lib/repull/models/delete_connection200_response.rb +234 -0
- data/lib/repull/models/delete_kv200_response.rb +1 -1
- data/lib/repull/models/error.rb +1 -1
- data/lib/repull/models/error_error.rb +44 -2
- data/lib/repull/models/error_error_support.rb +1 -1
- data/lib/repull/models/get_airbnb_alteration200_response.rb +2 -2
- 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_checkin_guide200_response.rb +192 -0
- data/lib/repull/models/get_airbnb_listing_details200_response.rb +192 -0
- data/lib/repull/models/get_airbnb_listing_quality200_response.rb +2 -2
- data/lib/repull/models/get_airbnb_listing_settings200_response.rb +2 -2
- data/lib/repull/models/get_airbnb_thread200_response.rb +2 -2
- data/lib/repull/models/get_health200_response.rb +1 -1
- data/lib/repull/models/get_usage_logs200_response.rb +1 -1
- data/lib/repull/models/get_usage_logs200_response_data_inner.rb +1 -1
- data/lib/repull/models/get_usage_logs200_response_pagination.rb +3 -3
- data/lib/repull/models/get_usage_summary200_response.rb +2 -2
- data/lib/repull/models/get_usage_summary200_response_breakdown_inner.rb +1 -1
- data/lib/repull/models/get_usage_summary200_response_limits.rb +3 -3
- data/lib/repull/models/get_usage_summary200_response_remaining.rb +2 -2
- data/lib/repull/models/get_usage_summary200_response_status_distribution.rb +1 -1
- data/lib/repull/models/get_usage_summary200_response_timeline_inner.rb +1 -1
- data/lib/repull/models/get_usage_summary200_response_totals.rb +1 -1
- data/lib/repull/models/get_usage_summary200_response_used.rb +2 -2
- data/lib/repull/models/get_usage_tier200_response.rb +2 -2
- data/lib/repull/models/get_usage_tier200_response_limits.rb +4 -4
- data/lib/repull/models/get_usage_tier200_response_remaining.rb +3 -3
- data/lib/repull/models/get_usage_tier200_response_used.rb +3 -3
- data/lib/repull/models/guest.rb +1 -1
- data/lib/repull/models/guest_contact.rb +1 -1
- data/lib/repull/models/guest_create_request.rb +250 -0
- data/lib/repull/models/guest_create_response.rb +227 -0
- data/lib/repull/models/guest_create_response_contacts_inner.rb +199 -0
- data/lib/repull/models/guest_flag.rb +1 -1
- data/lib/repull/models/guest_list_response.rb +1 -1
- data/lib/repull/models/guest_note.rb +1 -1
- data/lib/repull/models/guest_profile.rb +1 -1
- data/lib/repull/models/guest_reservations_summary.rb +1 -1
- data/lib/repull/models/list_airbnb_alterations200_response.rb +2 -2
- data/lib/repull/models/list_airbnb_listing_amenities200_response.rb +2 -2
- data/lib/repull/models/list_airbnb_listing_amenities200_response_data.rb +1 -1
- 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_transactions200_response.rb +3 -3
- data/lib/repull/models/list_booking_reservations200_response.rb +104 -0
- data/lib/repull/models/list_kv200_response.rb +1 -1
- data/lib/repull/models/list_kv200_response_data_inner.rb +1 -1
- data/lib/repull/models/list_kv200_response_pagination.rb +2 -2
- data/lib/repull/models/listing.rb +3 -2
- data/lib/repull/models/listing_active_request.rb +2 -2
- data/lib/repull/models/listing_active_response.rb +1 -1
- data/lib/repull/models/listing_address.rb +1 -1
- data/lib/repull/models/listing_amenity.rb +1 -1
- data/lib/repull/models/listing_channel.rb +1 -1
- data/lib/repull/models/listing_comp.rb +1 -1
- data/lib/repull/models/listing_comp_nightly.rb +1 -1
- data/lib/repull/models/listing_comp_ratings.rb +1 -1
- data/lib/repull/models/listing_comps_response.rb +1 -1
- data/lib/repull/models/listing_content.rb +14 -3
- data/lib/repull/models/listing_content_update_request.rb +22 -3
- data/lib/repull/models/listing_content_update_request_address.rb +1 -1
- data/lib/repull/models/listing_content_update_request_amenities.rb +1 -1
- data/lib/repull/models/listing_content_update_request_amenities_one_of_inner.rb +1 -1
- data/lib/repull/models/listing_content_update_request_details.rb +206 -0
- data/lib/repull/models/listing_content_update_request_occupancy.rb +1 -1
- data/lib/repull/models/listing_content_update_request_photos_inner.rb +1 -1
- data/lib/repull/models/listing_content_update_request_photos_inner_one_of.rb +1 -1
- data/lib/repull/models/listing_content_update_request_policies.rb +96 -6
- data/lib/repull/models/listing_content_update_response.rb +2 -2
- data/lib/repull/models/listing_create_request.rb +1 -1
- data/lib/repull/models/listing_create_response.rb +1 -1
- data/lib/repull/models/listing_created_event.rb +1 -1
- data/lib/repull/models/listing_created_payload.rb +1 -1
- data/lib/repull/models/listing_created_payload_address.rb +1 -1
- data/lib/repull/models/listing_deleted_event.rb +1 -1
- data/lib/repull/models/listing_deleted_payload.rb +1 -1
- data/lib/repull/models/listing_details.rb +1 -1
- data/lib/repull/models/listing_generate_content_request.rb +1 -1
- data/lib/repull/models/listing_generate_content_response.rb +1 -1
- data/lib/repull/models/listing_list_response.rb +1 -1
- data/lib/repull/models/{studio_file.rb → listing_photo.rb} +23 -34
- data/lib/repull/models/listing_photo_delete_request.rb +165 -0
- data/lib/repull/models/{studio_error.rb → listing_photo_delete_response.rb} +20 -12
- data/lib/repull/models/listing_photo_upload_url_request.rb +203 -0
- data/lib/repull/models/listing_photo_upload_url_response.rb +198 -0
- data/lib/repull/models/{vrbo_listing_list_response.rb → listing_photos_response.rb} +19 -19
- data/lib/repull/models/listing_pricing_apply_request.rb +1 -1
- data/lib/repull/models/listing_pricing_apply_response.rb +1 -1
- data/lib/repull/models/listing_pricing_history_entry.rb +2 -2
- data/lib/repull/models/listing_pricing_history_response.rb +1 -1
- data/lib/repull/models/listing_pricing_recommendation.rb +1 -1
- data/lib/repull/models/listing_pricing_response.rb +1 -1
- data/lib/repull/models/listing_pricing_response_comp_summary.rb +1 -1
- data/lib/repull/models/listing_pricing_response_date_range.rb +1 -1
- data/lib/repull/models/listing_pricing_response_listing.rb +1 -1
- data/lib/repull/models/listing_pricing_strategy.rb +1 -1
- data/lib/repull/models/listing_pricing_strategy_input.rb +1 -1
- data/lib/repull/models/listing_publish_airbnb_request.rb +1 -1
- data/lib/repull/models/listing_publish_airbnb_response.rb +165 -0
- data/lib/repull/models/listing_publish_response.rb +1 -1
- data/lib/repull/models/listing_publish_status_channel.rb +1 -1
- data/lib/repull/models/listing_publish_status_connection.rb +1 -1
- data/lib/repull/models/listing_publish_status_response.rb +1 -1
- 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_quality_tier.rb +1 -1
- data/lib/repull/models/listing_segment.rb +1 -1
- data/lib/repull/models/listing_segment_recommendation.rb +1 -1
- data/lib/repull/models/listing_segments_response.rb +1 -1
- data/lib/repull/models/listing_segments_response_scope.rb +1 -1
- data/lib/repull/models/listing_status_batch_request.rb +212 -0
- data/lib/repull/models/{sandbox_reset_result.rb → listing_status_batch_response.rb} +57 -51
- data/lib/repull/models/listing_updated_event.rb +1 -1
- data/lib/repull/models/listing_updated_payload.rb +1 -1
- data/lib/repull/models/map_airbnb_listing_request.rb +1 -1
- data/lib/repull/models/map_airbnb_listing_response.rb +1 -1
- data/lib/repull/models/map_connect_booking_rooms_request.rb +1 -1
- data/lib/repull/models/map_connect_booking_rooms_response.rb +16 -5
- data/lib/repull/models/market_browse_category.rb +1 -1
- data/lib/repull/models/market_browse_entry.rb +1 -1
- data/lib/repull/models/market_browse_featured.rb +1 -1
- data/lib/repull/models/market_browse_response.rb +1 -1
- data/lib/repull/models/market_calendar_day.rb +1 -1
- data/lib/repull/models/market_calendar_day_events_inner.rb +1 -1
- data/lib/repull/models/market_calendar_response.rb +1 -1
- data/lib/repull/models/market_detail_response.rb +1 -1
- data/lib/repull/models/market_detail_response_price_distribution_inner.rb +1 -1
- data/lib/repull/models/market_detail_response_property_type_mix_inner.rb +1 -1
- data/lib/repull/models/market_detail_response_supply_trend_inner.rb +1 -1
- data/lib/repull/models/market_detail_response_top_comps.rb +1 -1
- data/lib/repull/models/market_event.rb +1 -1
- data/lib/repull/models/market_my_listing.rb +1 -1
- data/lib/repull/models/market_summary.rb +1 -1
- data/lib/repull/models/market_top_comp.rb +1 -1
- data/lib/repull/models/markets_overview_response.rb +1 -1
- data/lib/repull/models/markets_overview_response_browse.rb +1 -1
- data/lib/repull/models/markets_overview_response_subscriptions.rb +1 -1
- data/lib/repull/models/markets_overview_response_totals.rb +1 -1
- data/lib/repull/models/message.rb +1 -1
- data/lib/repull/models/message_list_response.rb +1 -1
- data/lib/repull/models/pagination.rb +1 -1
- data/lib/repull/models/payment_completed_event.rb +1 -1
- data/lib/repull/models/payment_completed_payload.rb +1 -1
- data/lib/repull/models/payment_refunded_event.rb +1 -1
- data/lib/repull/models/payment_refunded_payload.rb +1 -1
- data/lib/repull/models/plumguide_listing.rb +1 -1
- data/lib/repull/models/plumguide_listing_list_response.rb +1 -1
- data/lib/repull/models/property.rb +17 -7
- data/lib/repull/models/property_availability.rb +33 -7
- data/lib/repull/models/property_availability_coverage.rb +222 -0
- data/lib/repull/models/property_availability_day.rb +4 -4
- data/lib/repull/models/property_list_response.rb +1 -1
- data/lib/repull/models/{studio_error_error.rb → publish_section_error.rb} +56 -36
- data/lib/repull/models/quote.rb +240 -0
- data/lib/repull/models/quote_pricing.rb +218 -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/reply_booking_review200_response.rb +1 -1
- data/lib/repull/models/reply_booking_review_request.rb +1 -1
- data/lib/repull/models/reply_to_review201_response.rb +165 -0
- data/lib/repull/models/reply_to_review_request.rb +165 -0
- data/lib/repull/models/repull_ping_event.rb +1 -1
- data/lib/repull/models/repull_ping_payload.rb +1 -1
- data/lib/repull/models/reservation.rb +24 -2
- data/lib/repull/models/{studio_deployment.rb → reservation_alteration_created_event.rb} +67 -57
- data/lib/repull/models/reservation_alteration_created_payload.rb +177 -0
- data/lib/repull/models/reservation_alteration_responded_event.rb +217 -0
- data/lib/repull/models/reservation_alteration_responded_payload.rb +175 -0
- data/lib/repull/models/reservation_cancelled_event.rb +1 -1
- data/lib/repull/models/reservation_cancelled_payload.rb +1 -1
- data/lib/repull/models/reservation_create_request.rb +403 -0
- data/lib/repull/models/{create_airbnb_alteration_request.rb → reservation_create_response.rb} +73 -35
- data/lib/repull/models/reservation_created_event.rb +1 -1
- data/lib/repull/models/reservation_created_payload.rb +1 -1
- data/lib/repull/models/reservation_financials.rb +36 -8
- data/lib/repull/models/reservation_guest_financials.rb +173 -0
- data/lib/repull/models/reservation_guest_input.rb +193 -0
- data/lib/repull/models/reservation_host_financials.rb +207 -0
- data/lib/repull/models/reservation_list_response.rb +1 -1
- data/lib/repull/models/reservation_message_received_event.rb +1 -1
- data/lib/repull/models/reservation_message_received_payload.rb +1 -1
- data/lib/repull/models/reservation_message_received_payload_from.rb +1 -1
- data/lib/repull/models/reservation_money_line.rb +216 -0
- data/lib/repull/models/reservation_occupancy.rb +1 -1
- data/lib/repull/models/reservation_primary_guest.rb +1 -1
- data/lib/repull/models/reservation_update_request.rb +255 -0
- data/lib/repull/models/reservation_update_response.rb +240 -0
- data/lib/repull/models/reservation_updated_event.rb +1 -1
- data/lib/repull/models/reservation_updated_payload.rb +1 -1
- data/lib/repull/models/reservation_webhook_object.rb +39 -6
- data/lib/repull/models/respond_airbnb_review_request.rb +1 -1
- data/lib/repull/models/review.rb +14 -3
- data/lib/repull/models/review_category.rb +1 -1
- data/lib/repull/models/review_created_event.rb +217 -0
- data/lib/repull/models/review_created_payload.rb +165 -0
- data/lib/repull/models/review_list_response.rb +1 -1
- data/lib/repull/models/review_responded_event.rb +217 -0
- data/lib/repull/models/review_responded_payload.rb +175 -0
- data/lib/repull/models/review_response.rb +1 -1
- data/lib/repull/models/review_webhook_object.rb +277 -0
- data/lib/repull/models/rotate_webhook_secret200_response.rb +1 -1
- data/lib/repull/models/select_connect_provider_request.rb +1 -1
- data/lib/repull/models/select_provider_response.rb +1 -1
- data/lib/repull/models/send_airbnb_message_request.rb +187 -0
- data/lib/repull/models/{sandbox_reset_result_deleted.rb → send_booking_message_request.rb} +53 -50
- data/lib/repull/models/send_message_request.rb +193 -0
- data/lib/repull/models/send_message_response.rb +241 -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/set_kv_request.rb +1 -1
- data/lib/repull/models/{booking_property_list_response.rb → submit_beds24_credentials200_response.rb} +19 -19
- data/lib/repull/models/submit_beds24_credentials_request.rb +177 -0
- data/lib/repull/models/submit_bookingsync_credentials_request.rb +177 -0
- data/lib/repull/models/submit_guesty_credentials_request.rb +177 -0
- data/lib/repull/models/submit_hospitable_credentials_request.rb +177 -0
- data/lib/repull/models/submit_hostaway_credentials_request.rb +177 -0
- data/lib/repull/models/submit_igms_credentials_request.rb +177 -0
- data/lib/repull/models/submit_lodgify_credentials_request.rb +177 -0
- data/lib/repull/models/submit_ownerrez_credentials_request.rb +177 -0
- data/lib/repull/models/submit_smoobu_credentials_request.rb +177 -0
- data/lib/repull/models/submit_vrbo_credentials_request.rb +177 -0
- data/lib/repull/models/sync_airbnb_transactions200_response.rb +191 -0
- data/lib/repull/models/sync_airbnb_transactions_request.rb +201 -0
- data/lib/repull/models/test_webhook_request.rb +1 -1
- data/lib/repull/models/{booking_conversation_list_response.rb → update_airbnb_booking_settings200_response.rb} +26 -20
- 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/{sandbox_fixture_ref.rb → update_airbnb_listing_room_request_room_amenities_inner.rb} +26 -37
- 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/update_airbnb_message_request.rb +1 -1
- data/lib/repull/models/update_booking_charges_request.rb +1 -1
- data/lib/repull/models/update_listing_pricing_strategy200_response.rb +1 -1
- data/lib/repull/models/update_webhook_request.rb +1 -1
- 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/vrbo_listing.rb +1 -1
- data/lib/repull/models/vrbo_reservation.rb +1 -1
- data/lib/repull/models/vrbo_reservation_list_response.rb +1 -1
- data/lib/repull/models/webhook_delivery.rb +1 -1
- data/lib/repull/models/webhook_delivery_detail.rb +1 -1
- data/lib/repull/models/webhook_delivery_list_response.rb +1 -1
- data/lib/repull/models/webhook_event.rb +12 -4
- data/lib/repull/models/webhook_event_catalog.rb +1 -1
- data/lib/repull/models/webhook_event_catalog_domains_inner.rb +1 -1
- data/lib/repull/models/webhook_event_catalog_entry.rb +1 -1
- data/lib/repull/models/webhook_event_type.rb +6 -2
- data/lib/repull/models/webhook_list_response.rb +1 -1
- data/lib/repull/models/webhook_subscription.rb +1 -1
- data/lib/repull/version.rb +2 -2
- data/lib/repull.rb +153 -16
- data/openapi/v1.json +12620 -5281
- data/scripts/check-spec-freshness.py +399 -0
- data/scripts/regen.sh +32 -3
- metadata +155 -19
- data/lib/repull/api/sandbox_api.rb +0 -136
- data/lib/repull/models/sandbox_seed_result.rb +0 -278
- data/lib/repull/models/studio_generation.rb +0 -215
- data/lib/repull/models/studio_project.rb +0 -241
- data/spec/api/ai_api_spec.rb +0 -47
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#Repull API
|
|
3
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
|
|
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
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
Contact: ivan@vanio.ai
|
|
@@ -19,23 +19,95 @@ module Repull
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
#
|
|
23
|
-
#
|
|
22
|
+
# Accept Airbnb alteration
|
|
23
|
+
# Accept a pending Airbnb reservation alteration. **Write-side** — calls Airbnb upstream (`respondToAlteration`) to approve the proposed date / guest-count / price change. Requires a connected Airbnb host for the workspace (else `404 no_connection`) and that the alteration id belongs to a reservation in your workspace (else `404 not_found`). No request body is required. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
24
|
+
# @param id [String] Airbnb alteration id (the `alterationId` from a `GET /v1/channels/airbnb/alterations` row).
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [Object] :body
|
|
27
|
+
# @return [nil]
|
|
28
|
+
def accept_airbnb_alteration(id, opts = {})
|
|
29
|
+
accept_airbnb_alteration_with_http_info(id, opts)
|
|
30
|
+
nil
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Accept Airbnb alteration
|
|
34
|
+
# Accept a pending Airbnb reservation alteration. **Write-side** — calls Airbnb upstream (`respondToAlteration`) to approve the proposed date / guest-count / price change. Requires a connected Airbnb host for the workspace (else `404 no_connection`) and that the alteration id belongs to a reservation in your workspace (else `404 not_found`). No request body is required. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
35
|
+
# @param id [String] Airbnb alteration id (the `alterationId` from a `GET /v1/channels/airbnb/alterations` row).
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [Object] :body
|
|
38
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
39
|
+
def accept_airbnb_alteration_with_http_info(id, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.accept_airbnb_alteration ...'
|
|
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 AirbnbApi.accept_airbnb_alteration"
|
|
46
|
+
end
|
|
47
|
+
# resource path
|
|
48
|
+
local_var_path = '/v1/channels/airbnb/alterations/{id}/accept'.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
|
+
# HTTP header 'Content-Type'
|
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
59
|
+
if !content_type.nil?
|
|
60
|
+
header_params['Content-Type'] = content_type
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# form parameters
|
|
64
|
+
form_params = opts[:form_params] || {}
|
|
65
|
+
|
|
66
|
+
# http body (model)
|
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
68
|
+
|
|
69
|
+
# return_type
|
|
70
|
+
return_type = opts[:debug_return_type]
|
|
71
|
+
|
|
72
|
+
# auth_names
|
|
73
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
74
|
+
|
|
75
|
+
new_options = opts.merge(
|
|
76
|
+
:operation => :"AirbnbApi.accept_airbnb_alteration",
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
86
|
+
if @api_client.config.debugging
|
|
87
|
+
@api_client.config.logger.debug "API called: AirbnbApi#accept_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
88
|
+
end
|
|
89
|
+
return data, status_code, headers
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Listing action (delete/push/publish/unlist/relist)
|
|
93
|
+
# Apply a state action to a listing by id. The path `id` is the canonical Repull listing id. **Deactivating in Repull and unlisting on Airbnb are different operations.** `delete` is a **deactivate of the Repull record only** — it sets the listing inactive and KEEPS the row; it does NOT touch the Airbnb listing, which stays live and keeps taking bookings. Use it to exclude a listing from the API / trim back under the plan-listings cap; reactivate via `PATCH /v1/listings/{id}` with `{ \"active\": true }`. Idempotent. `unlist` calls Airbnb and **takes the live listing down**: it is deactivated with a valid deactivation reason and then READ BACK, so \"Airbnb accepted the call but the listing is still live\" is reported as a failure rather than a success. Requires `airbnbConnectionId` — a listing can be connected to more than one Airbnb listing, and taking down the wrong one is not undoable through this API. `relist` puts it back up (re-enables sync and makes the listing available again); it does not push content. `push` / `publish` push the listing's content to Airbnb via the same host-side sync orchestrator as `POST /v1/listings/{id}/publish/airbnb` — pass `airbnbConnectionId` to update an already-mapped Airbnb listing, or `hostId` to create + publish a new one under that host. `force` re-pushes every field, ignoring dirty-field tracking. The result is per-section: see `AirbnbPublishResult`. Any other action (e.g. `pull`) returns a structured 422 naming the supported actions. Returns `403 listing_inactive` for `push`/`publish`/`unlist`/`relist` when the listing is inactive. `delete` (deactivation) is always accepted.
|
|
24
94
|
# @param id [String]
|
|
25
95
|
# @param [Hash] opts the optional parameters
|
|
96
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
26
97
|
# @option opts [AirbnbListingActionRequest] :airbnb_listing_action_request
|
|
27
|
-
# @return [
|
|
98
|
+
# @return [AirbnbListingAction200Response]
|
|
28
99
|
def airbnb_listing_action(id, opts = {})
|
|
29
|
-
airbnb_listing_action_with_http_info(id, opts)
|
|
30
|
-
|
|
100
|
+
data, _status_code, _headers = airbnb_listing_action_with_http_info(id, opts)
|
|
101
|
+
data
|
|
31
102
|
end
|
|
32
103
|
|
|
33
|
-
# Listing action (delete/push/publish)
|
|
34
|
-
# Apply a state action to a listing by id. The path `id` is the canonical Repull listing id. `delete` is a **deactivate of the Repull record only** — it sets the listing inactive and KEEPS the row; it does NOT touch the
|
|
104
|
+
# Listing action (delete/push/publish/unlist/relist)
|
|
105
|
+
# Apply a state action to a listing by id. The path `id` is the canonical Repull listing id. **Deactivating in Repull and unlisting on Airbnb are different operations.** `delete` is a **deactivate of the Repull record only** — it sets the listing inactive and KEEPS the row; it does NOT touch the Airbnb listing, which stays live and keeps taking bookings. Use it to exclude a listing from the API / trim back under the plan-listings cap; reactivate via `PATCH /v1/listings/{id}` with `{ \"active\": true }`. Idempotent. `unlist` calls Airbnb and **takes the live listing down**: it is deactivated with a valid deactivation reason and then READ BACK, so \"Airbnb accepted the call but the listing is still live\" is reported as a failure rather than a success. Requires `airbnbConnectionId` — a listing can be connected to more than one Airbnb listing, and taking down the wrong one is not undoable through this API. `relist` puts it back up (re-enables sync and makes the listing available again); it does not push content. `push` / `publish` push the listing's content to Airbnb via the same host-side sync orchestrator as `POST /v1/listings/{id}/publish/airbnb` — pass `airbnbConnectionId` to update an already-mapped Airbnb listing, or `hostId` to create + publish a new one under that host. `force` re-pushes every field, ignoring dirty-field tracking. The result is per-section: see `AirbnbPublishResult`. Any other action (e.g. `pull`) returns a structured 422 naming the supported actions. Returns `403 listing_inactive` for `push`/`publish`/`unlist`/`relist` when the listing is inactive. `delete` (deactivation) is always accepted.
|
|
35
106
|
# @param id [String]
|
|
36
107
|
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
37
109
|
# @option opts [AirbnbListingActionRequest] :airbnb_listing_action_request
|
|
38
|
-
# @return [Array<(
|
|
110
|
+
# @return [Array<(AirbnbListingAction200Response, Integer, Hash)>] AirbnbListingAction200Response data, response status code and response headers
|
|
39
111
|
def airbnb_listing_action_with_http_info(id, opts = {})
|
|
40
112
|
if @api_client.config.debugging
|
|
41
113
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.airbnb_listing_action ...'
|
|
@@ -44,6 +116,10 @@ module Repull
|
|
|
44
116
|
if @api_client.config.client_side_validation && id.nil?
|
|
45
117
|
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.airbnb_listing_action"
|
|
46
118
|
end
|
|
119
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
120
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AirbnbApi.airbnb_listing_action, the character length must be smaller than or equal to 255.'
|
|
121
|
+
end
|
|
122
|
+
|
|
47
123
|
# resource path
|
|
48
124
|
local_var_path = '/v1/channels/airbnb/listings/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
49
125
|
|
|
@@ -59,6 +135,7 @@ module Repull
|
|
|
59
135
|
if !content_type.nil?
|
|
60
136
|
header_params['Content-Type'] = content_type
|
|
61
137
|
end
|
|
138
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
62
139
|
|
|
63
140
|
# form parameters
|
|
64
141
|
form_params = opts[:form_params] || {}
|
|
@@ -67,7 +144,7 @@ module Repull
|
|
|
67
144
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'airbnb_listing_action_request'])
|
|
68
145
|
|
|
69
146
|
# return_type
|
|
70
|
-
return_type = opts[:debug_return_type]
|
|
147
|
+
return_type = opts[:debug_return_type] || 'AirbnbListingAction200Response'
|
|
71
148
|
|
|
72
149
|
# auth_names
|
|
73
150
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -90,7 +167,7 @@ module Repull
|
|
|
90
167
|
end
|
|
91
168
|
|
|
92
169
|
# Accept/decline/cancel Airbnb reservation
|
|
93
|
-
# Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries).
|
|
170
|
+
# Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
94
171
|
# @param code [String]
|
|
95
172
|
# @param [Hash] opts the optional parameters
|
|
96
173
|
# @return [nil]
|
|
@@ -100,7 +177,7 @@ module Repull
|
|
|
100
177
|
end
|
|
101
178
|
|
|
102
179
|
# Accept/decline/cancel Airbnb reservation
|
|
103
|
-
# Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries).
|
|
180
|
+
# Apply a state action to an Airbnb reservation — `accept` / `decline` (for inquiries and reservation requests), `cancel` (host cancellation, carries penalties), `pre-approve` (for inquiries). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
104
181
|
# @param code [String]
|
|
105
182
|
# @param [Hash] opts the optional parameters
|
|
106
183
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -120,6 +197,8 @@ module Repull
|
|
|
120
197
|
|
|
121
198
|
# header parameters
|
|
122
199
|
header_params = opts[:header_params] || {}
|
|
200
|
+
# HTTP header 'Accept' (if needed)
|
|
201
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
123
202
|
|
|
124
203
|
# form parameters
|
|
125
204
|
form_params = opts[:form_params] || {}
|
|
@@ -150,28 +229,98 @@ module Repull
|
|
|
150
229
|
return data, status_code, headers
|
|
151
230
|
end
|
|
152
231
|
|
|
153
|
-
#
|
|
154
|
-
#
|
|
155
|
-
# @param
|
|
232
|
+
# Cancel Airbnb alteration
|
|
233
|
+
# Withdraw an alteration you proposed, before the other side has answered it. **Write-side** — calls Airbnb upstream (`respondToAlteration` with status `canceled`). Use this when you sent the wrong dates, guest count, price or listing: the alteration stops being pending instead of sitting there until the guest acts on it. This is the third of Airbnb's three answers to a pending alteration, alongside `accept` and `decline`, and behaves identically to them: requires a connected Airbnb host for the workspace (else `404 no_connection`) and that the alteration id belongs to a reservation in your workspace (else `404 not_found`). No request body is required. Airbnb decides whether an alteration can still be withdrawn — one that has already been accepted or declined is refused upstream, and Airbnb's own reason comes back in `message`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
234
|
+
# @param id [String] Airbnb alteration id (the `alterationId` from a `GET /v1/channels/airbnb/alterations` row).
|
|
156
235
|
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @option opts [Object] :body
|
|
157
237
|
# @return [nil]
|
|
158
|
-
def
|
|
159
|
-
|
|
238
|
+
def cancel_airbnb_alteration(id, opts = {})
|
|
239
|
+
cancel_airbnb_alteration_with_http_info(id, opts)
|
|
160
240
|
nil
|
|
161
241
|
end
|
|
162
242
|
|
|
163
|
-
#
|
|
164
|
-
#
|
|
165
|
-
# @param
|
|
243
|
+
# Cancel Airbnb alteration
|
|
244
|
+
# Withdraw an alteration you proposed, before the other side has answered it. **Write-side** — calls Airbnb upstream (`respondToAlteration` with status `canceled`). Use this when you sent the wrong dates, guest count, price or listing: the alteration stops being pending instead of sitting there until the guest acts on it. This is the third of Airbnb's three answers to a pending alteration, alongside `accept` and `decline`, and behaves identically to them: requires a connected Airbnb host for the workspace (else `404 no_connection`) and that the alteration id belongs to a reservation in your workspace (else `404 not_found`). No request body is required. Airbnb decides whether an alteration can still be withdrawn — one that has already been accepted or declined is refused upstream, and Airbnb's own reason comes back in `message`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
245
|
+
# @param id [String] Airbnb alteration id (the `alterationId` from a `GET /v1/channels/airbnb/alterations` row).
|
|
166
246
|
# @param [Hash] opts the optional parameters
|
|
247
|
+
# @option opts [Object] :body
|
|
167
248
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
168
|
-
def
|
|
249
|
+
def cancel_airbnb_alteration_with_http_info(id, opts = {})
|
|
250
|
+
if @api_client.config.debugging
|
|
251
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.cancel_airbnb_alteration ...'
|
|
252
|
+
end
|
|
253
|
+
# verify the required parameter 'id' is set
|
|
254
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
255
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.cancel_airbnb_alteration"
|
|
256
|
+
end
|
|
257
|
+
# resource path
|
|
258
|
+
local_var_path = '/v1/channels/airbnb/alterations/{id}/cancel'.sub('{id}', CGI.escape(id.to_s))
|
|
259
|
+
|
|
260
|
+
# query parameters
|
|
261
|
+
query_params = opts[:query_params] || {}
|
|
262
|
+
|
|
263
|
+
# header parameters
|
|
264
|
+
header_params = opts[:header_params] || {}
|
|
265
|
+
# HTTP header 'Accept' (if needed)
|
|
266
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
267
|
+
# HTTP header 'Content-Type'
|
|
268
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
269
|
+
if !content_type.nil?
|
|
270
|
+
header_params['Content-Type'] = content_type
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# form parameters
|
|
274
|
+
form_params = opts[:form_params] || {}
|
|
275
|
+
|
|
276
|
+
# http body (model)
|
|
277
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
278
|
+
|
|
279
|
+
# return_type
|
|
280
|
+
return_type = opts[:debug_return_type]
|
|
281
|
+
|
|
282
|
+
# auth_names
|
|
283
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
284
|
+
|
|
285
|
+
new_options = opts.merge(
|
|
286
|
+
:operation => :"AirbnbApi.cancel_airbnb_alteration",
|
|
287
|
+
:header_params => header_params,
|
|
288
|
+
:query_params => query_params,
|
|
289
|
+
:form_params => form_params,
|
|
290
|
+
:body => post_body,
|
|
291
|
+
:auth_names => auth_names,
|
|
292
|
+
:return_type => return_type
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
296
|
+
if @api_client.config.debugging
|
|
297
|
+
@api_client.config.logger.debug "API called: AirbnbApi#cancel_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
298
|
+
end
|
|
299
|
+
return data, status_code, headers
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Create Airbnb alteration
|
|
303
|
+
# Propose a change to an existing Airbnb reservation: new dates, a new guest count, a new total price, or a move to a different listing. **Write-side** — calls Airbnb upstream. Requires a connected Airbnb host for the workspace, else `404 no_connection`. The body is validated before anything reaches Airbnb. `confirmation_code` is required and **at least one** of `check_in`, `check_out`, `number_of_guests`, `total_price` or `listing_id` must be sent with it — an alteration that changes nothing is `422 invalid_params`, not a request Airbnb is asked to act on. Unknown fields are refused rather than ignored, so a misspelling can never look like a successful write. **Listing transfer.** `listing_id` moves the reservation to another listing in your workspace. Send the **Repull** listing id (the `id` from `GET /v1/properties`); Repull checks you own it, that it is active and connected to Airbnb, translates it to the Airbnb listing id and sends it upstream. Callers who hold the Airbnb-side id instead may send `airbnb_listing_id`. **Airbnb decides** whether to honour a listing change on an alteration — Repull sends it and reports Airbnb’s answer; a refusal comes back as `422 airbnb_rejected` carrying Airbnb’s own message. Returns `403 listing_inactive` when the reservation’s listing, or the listing it is being moved to, is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
304
|
+
# @param airbnb_alteration_create_request [AirbnbAlterationCreateRequest]
|
|
305
|
+
# @param [Hash] opts the optional parameters
|
|
306
|
+
# @return [AirbnbAlteration]
|
|
307
|
+
def create_airbnb_alteration(airbnb_alteration_create_request, opts = {})
|
|
308
|
+
data, _status_code, _headers = create_airbnb_alteration_with_http_info(airbnb_alteration_create_request, opts)
|
|
309
|
+
data
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Create Airbnb alteration
|
|
313
|
+
# Propose a change to an existing Airbnb reservation: new dates, a new guest count, a new total price, or a move to a different listing. **Write-side** — calls Airbnb upstream. Requires a connected Airbnb host for the workspace, else `404 no_connection`. The body is validated before anything reaches Airbnb. `confirmation_code` is required and **at least one** of `check_in`, `check_out`, `number_of_guests`, `total_price` or `listing_id` must be sent with it — an alteration that changes nothing is `422 invalid_params`, not a request Airbnb is asked to act on. Unknown fields are refused rather than ignored, so a misspelling can never look like a successful write. **Listing transfer.** `listing_id` moves the reservation to another listing in your workspace. Send the **Repull** listing id (the `id` from `GET /v1/properties`); Repull checks you own it, that it is active and connected to Airbnb, translates it to the Airbnb listing id and sends it upstream. Callers who hold the Airbnb-side id instead may send `airbnb_listing_id`. **Airbnb decides** whether to honour a listing change on an alteration — Repull sends it and reports Airbnb’s answer; a refusal comes back as `422 airbnb_rejected` carrying Airbnb’s own message. Returns `403 listing_inactive` when the reservation’s listing, or the listing it is being moved to, is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
314
|
+
# @param airbnb_alteration_create_request [AirbnbAlterationCreateRequest]
|
|
315
|
+
# @param [Hash] opts the optional parameters
|
|
316
|
+
# @return [Array<(AirbnbAlteration, Integer, Hash)>] AirbnbAlteration data, response status code and response headers
|
|
317
|
+
def create_airbnb_alteration_with_http_info(airbnb_alteration_create_request, opts = {})
|
|
169
318
|
if @api_client.config.debugging
|
|
170
319
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_alteration ...'
|
|
171
320
|
end
|
|
172
|
-
# verify the required parameter '
|
|
173
|
-
if @api_client.config.client_side_validation &&
|
|
174
|
-
fail ArgumentError, "Missing the required parameter '
|
|
321
|
+
# verify the required parameter 'airbnb_alteration_create_request' is set
|
|
322
|
+
if @api_client.config.client_side_validation && airbnb_alteration_create_request.nil?
|
|
323
|
+
fail ArgumentError, "Missing the required parameter 'airbnb_alteration_create_request' when calling AirbnbApi.create_airbnb_alteration"
|
|
175
324
|
end
|
|
176
325
|
# resource path
|
|
177
326
|
local_var_path = '/v1/channels/airbnb/alterations'
|
|
@@ -193,10 +342,10 @@ module Repull
|
|
|
193
342
|
form_params = opts[:form_params] || {}
|
|
194
343
|
|
|
195
344
|
# http body (model)
|
|
196
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
345
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_alteration_create_request)
|
|
197
346
|
|
|
198
347
|
# return_type
|
|
199
|
-
return_type = opts[:debug_return_type]
|
|
348
|
+
return_type = opts[:debug_return_type] || 'AirbnbAlteration'
|
|
200
349
|
|
|
201
350
|
# auth_names
|
|
202
351
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -219,23 +368,23 @@ module Repull
|
|
|
219
368
|
end
|
|
220
369
|
|
|
221
370
|
# Create an Airbnb room
|
|
222
|
-
# Create a new room on an Airbnb listing. **Write-side** — calls Airbnb upstream.
|
|
371
|
+
# Create a new room on an Airbnb listing, with its sleeping arrangement. **Write-side** — calls Airbnb upstream. Requires a connected Airbnb host, else `404 no_connection`. The response is the room object as Airbnb returned it. The new room is also seeded into our own copy, so the very next `GET /rooms` shows it rather than waiting for the sync. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
223
372
|
# @param id [String] Repull listing id (numeric string).
|
|
224
|
-
# @param
|
|
373
|
+
# @param create_airbnb_listing_room_request [CreateAirbnbListingRoomRequest]
|
|
225
374
|
# @param [Hash] opts the optional parameters
|
|
226
375
|
# @return [nil]
|
|
227
|
-
def create_airbnb_listing_room(id,
|
|
228
|
-
create_airbnb_listing_room_with_http_info(id,
|
|
376
|
+
def create_airbnb_listing_room(id, create_airbnb_listing_room_request, opts = {})
|
|
377
|
+
create_airbnb_listing_room_with_http_info(id, create_airbnb_listing_room_request, opts)
|
|
229
378
|
nil
|
|
230
379
|
end
|
|
231
380
|
|
|
232
381
|
# Create an Airbnb room
|
|
233
|
-
# Create a new room on an Airbnb listing. **Write-side** — calls Airbnb upstream.
|
|
382
|
+
# Create a new room on an Airbnb listing, with its sleeping arrangement. **Write-side** — calls Airbnb upstream. Requires a connected Airbnb host, else `404 no_connection`. The response is the room object as Airbnb returned it. The new room is also seeded into our own copy, so the very next `GET /rooms` shows it rather than waiting for the sync. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
234
383
|
# @param id [String] Repull listing id (numeric string).
|
|
235
|
-
# @param
|
|
384
|
+
# @param create_airbnb_listing_room_request [CreateAirbnbListingRoomRequest]
|
|
236
385
|
# @param [Hash] opts the optional parameters
|
|
237
386
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
238
|
-
def create_airbnb_listing_room_with_http_info(id,
|
|
387
|
+
def create_airbnb_listing_room_with_http_info(id, create_airbnb_listing_room_request, opts = {})
|
|
239
388
|
if @api_client.config.debugging
|
|
240
389
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.create_airbnb_listing_room ...'
|
|
241
390
|
end
|
|
@@ -243,9 +392,9 @@ module Repull
|
|
|
243
392
|
if @api_client.config.client_side_validation && id.nil?
|
|
244
393
|
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.create_airbnb_listing_room"
|
|
245
394
|
end
|
|
246
|
-
# verify the required parameter '
|
|
247
|
-
if @api_client.config.client_side_validation &&
|
|
248
|
-
fail ArgumentError, "Missing the required parameter '
|
|
395
|
+
# verify the required parameter 'create_airbnb_listing_room_request' is set
|
|
396
|
+
if @api_client.config.client_side_validation && create_airbnb_listing_room_request.nil?
|
|
397
|
+
fail ArgumentError, "Missing the required parameter 'create_airbnb_listing_room_request' when calling AirbnbApi.create_airbnb_listing_room"
|
|
249
398
|
end
|
|
250
399
|
# resource path
|
|
251
400
|
local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))
|
|
@@ -267,7 +416,7 @@ module Repull
|
|
|
267
416
|
form_params = opts[:form_params] || {}
|
|
268
417
|
|
|
269
418
|
# http body (model)
|
|
270
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
419
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_airbnb_listing_room_request)
|
|
271
420
|
|
|
272
421
|
# return_type
|
|
273
422
|
return_type = opts[:debug_return_type]
|
|
@@ -293,7 +442,7 @@ module Repull
|
|
|
293
442
|
end
|
|
294
443
|
|
|
295
444
|
# Create Airbnb special offer or pre-approval
|
|
296
|
-
# Create a special offer or a pre-approval on Airbnb. **Write-side** — calls Airbnb upstream. The `type` discriminator selects the flavour: - `offer` — a special offer with custom terms (the remaining body fields are the offer params). - `preapproval` — pre-approve an inquiry thread (requires `threadId`; optional `blockInstantBooking`). Requires a connected Airbnb host, else `404 no_connection`.
|
|
445
|
+
# Create a special offer or a pre-approval on Airbnb. **Write-side** — calls Airbnb upstream. The `type` discriminator selects the flavour: - `offer` — a special offer with custom terms (the remaining body fields are the offer params). - `preapproval` — pre-approve an inquiry thread (requires `threadId`; optional `blockInstantBooking`). Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
297
446
|
# @param create_airbnb_offer_request [CreateAirbnbOfferRequest]
|
|
298
447
|
# @param [Hash] opts the optional parameters
|
|
299
448
|
# @return [nil]
|
|
@@ -303,7 +452,7 @@ module Repull
|
|
|
303
452
|
end
|
|
304
453
|
|
|
305
454
|
# Create Airbnb special offer or pre-approval
|
|
306
|
-
# Create a special offer or a pre-approval on Airbnb. **Write-side** — calls Airbnb upstream. The `type` discriminator selects the flavour: - `offer` — a special offer with custom terms (the remaining body fields are the offer params). - `preapproval` — pre-approve an inquiry thread (requires `threadId`; optional `blockInstantBooking`). Requires a connected Airbnb host, else `404 no_connection`.
|
|
455
|
+
# Create a special offer or a pre-approval on Airbnb. **Write-side** — calls Airbnb upstream. The `type` discriminator selects the flavour: - `offer` — a special offer with custom terms (the remaining body fields are the offer params). - `preapproval` — pre-approve an inquiry thread (requires `threadId`; optional `blockInstantBooking`). Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
307
456
|
# @param create_airbnb_offer_request [CreateAirbnbOfferRequest]
|
|
308
457
|
# @param [Hash] opts the optional parameters
|
|
309
458
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -360,8 +509,78 @@ module Repull
|
|
|
360
509
|
return data, status_code, headers
|
|
361
510
|
end
|
|
362
511
|
|
|
512
|
+
# Decline Airbnb alteration
|
|
513
|
+
# Decline a pending Airbnb reservation alteration. **Write-side** — calls Airbnb upstream (`respondToAlteration`) to reject the proposed change. Requires a connected Airbnb host for the workspace (else `404 no_connection`) and that the alteration id belongs to a reservation in your workspace (else `404 not_found`). No request body is required. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
514
|
+
# @param id [String] Airbnb alteration id (the `alterationId` from a `GET /v1/channels/airbnb/alterations` row).
|
|
515
|
+
# @param [Hash] opts the optional parameters
|
|
516
|
+
# @option opts [Object] :body
|
|
517
|
+
# @return [nil]
|
|
518
|
+
def decline_airbnb_alteration(id, opts = {})
|
|
519
|
+
decline_airbnb_alteration_with_http_info(id, opts)
|
|
520
|
+
nil
|
|
521
|
+
end
|
|
522
|
+
|
|
523
|
+
# Decline Airbnb alteration
|
|
524
|
+
# Decline a pending Airbnb reservation alteration. **Write-side** — calls Airbnb upstream (`respondToAlteration`) to reject the proposed change. Requires a connected Airbnb host for the workspace (else `404 no_connection`) and that the alteration id belongs to a reservation in your workspace (else `404 not_found`). No request body is required. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
525
|
+
# @param id [String] Airbnb alteration id (the `alterationId` from a `GET /v1/channels/airbnb/alterations` row).
|
|
526
|
+
# @param [Hash] opts the optional parameters
|
|
527
|
+
# @option opts [Object] :body
|
|
528
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
529
|
+
def decline_airbnb_alteration_with_http_info(id, opts = {})
|
|
530
|
+
if @api_client.config.debugging
|
|
531
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.decline_airbnb_alteration ...'
|
|
532
|
+
end
|
|
533
|
+
# verify the required parameter 'id' is set
|
|
534
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
535
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.decline_airbnb_alteration"
|
|
536
|
+
end
|
|
537
|
+
# resource path
|
|
538
|
+
local_var_path = '/v1/channels/airbnb/alterations/{id}/decline'.sub('{id}', CGI.escape(id.to_s))
|
|
539
|
+
|
|
540
|
+
# query parameters
|
|
541
|
+
query_params = opts[:query_params] || {}
|
|
542
|
+
|
|
543
|
+
# header parameters
|
|
544
|
+
header_params = opts[:header_params] || {}
|
|
545
|
+
# HTTP header 'Accept' (if needed)
|
|
546
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
547
|
+
# HTTP header 'Content-Type'
|
|
548
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
549
|
+
if !content_type.nil?
|
|
550
|
+
header_params['Content-Type'] = content_type
|
|
551
|
+
end
|
|
552
|
+
|
|
553
|
+
# form parameters
|
|
554
|
+
form_params = opts[:form_params] || {}
|
|
555
|
+
|
|
556
|
+
# http body (model)
|
|
557
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
|
558
|
+
|
|
559
|
+
# return_type
|
|
560
|
+
return_type = opts[:debug_return_type]
|
|
561
|
+
|
|
562
|
+
# auth_names
|
|
563
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
564
|
+
|
|
565
|
+
new_options = opts.merge(
|
|
566
|
+
:operation => :"AirbnbApi.decline_airbnb_alteration",
|
|
567
|
+
:header_params => header_params,
|
|
568
|
+
:query_params => query_params,
|
|
569
|
+
:form_params => form_params,
|
|
570
|
+
:body => post_body,
|
|
571
|
+
:auth_names => auth_names,
|
|
572
|
+
:return_type => return_type
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
576
|
+
if @api_client.config.debugging
|
|
577
|
+
@api_client.config.logger.debug "API called: AirbnbApi#decline_airbnb_alteration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
578
|
+
end
|
|
579
|
+
return data, status_code, headers
|
|
580
|
+
end
|
|
581
|
+
|
|
363
582
|
# Delete an Airbnb photo
|
|
364
|
-
# Remove a single photo from an Airbnb listing. Pass the Airbnb-side photo id as `?photoId=`. Write-side — calls Airbnb upstream
|
|
583
|
+
# Remove a single photo from an Airbnb listing. Pass the Airbnb-side photo id as `?photoId=`. **Write-side** — calls Airbnb upstream. The photo is proven to belong to the listing named in the path first; a photo from another listing returns `404`. Airbnb refuses to delete a listing's last photo. Both stored copies drop the photo on success — `stored` reports whether that succeeded. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
365
584
|
# @param id [String]
|
|
366
585
|
# @param photo_id [String] Airbnb-side photo id to delete.
|
|
367
586
|
# @param [Hash] opts the optional parameters
|
|
@@ -372,7 +591,7 @@ module Repull
|
|
|
372
591
|
end
|
|
373
592
|
|
|
374
593
|
# Delete an Airbnb photo
|
|
375
|
-
# Remove a single photo from an Airbnb listing. Pass the Airbnb-side photo id as `?photoId=`. Write-side — calls Airbnb upstream
|
|
594
|
+
# Remove a single photo from an Airbnb listing. Pass the Airbnb-side photo id as `?photoId=`. **Write-side** — calls Airbnb upstream. The photo is proven to belong to the listing named in the path first; a photo from another listing returns `404`. Airbnb refuses to delete a listing's last photo. Both stored copies drop the photo on success — `stored` reports whether that succeeded. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
376
595
|
# @param id [String]
|
|
377
596
|
# @param photo_id [String] Airbnb-side photo id to delete.
|
|
378
597
|
# @param [Hash] opts the optional parameters
|
|
@@ -431,22 +650,22 @@ module Repull
|
|
|
431
650
|
end
|
|
432
651
|
|
|
433
652
|
# Delete an Airbnb room
|
|
434
|
-
# Delete a room from an Airbnb listing. **Write-side** — calls Airbnb upstream. Pass the Airbnb-side room id as `?roomId=`. Requires a connected Airbnb host, else `404 no_connection`.
|
|
653
|
+
# Delete a room from an Airbnb listing, and its beds with it. **Write-side** — calls Airbnb upstream. Pass the Airbnb-side room id as `?roomId=`. Requires a connected Airbnb host, else `404 no_connection`. The room is proven to belong to the listing named in the path first; a room from another listing returns `404`. Both stored copies drop the room on success — `stored` reports whether that succeeded. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
435
654
|
# @param id [String] Repull listing id (numeric string).
|
|
436
655
|
# @param room_id [String] Airbnb-side room id to delete.
|
|
437
656
|
# @param [Hash] opts the optional parameters
|
|
438
|
-
# @return [
|
|
657
|
+
# @return [DeleteAirbnbListingRoom200Response]
|
|
439
658
|
def delete_airbnb_listing_room(id, room_id, opts = {})
|
|
440
659
|
data, _status_code, _headers = delete_airbnb_listing_room_with_http_info(id, room_id, opts)
|
|
441
660
|
data
|
|
442
661
|
end
|
|
443
662
|
|
|
444
663
|
# Delete an Airbnb room
|
|
445
|
-
# Delete a room from an Airbnb listing. **Write-side** — calls Airbnb upstream. Pass the Airbnb-side room id as `?roomId=`. Requires a connected Airbnb host, else `404 no_connection`.
|
|
664
|
+
# Delete a room from an Airbnb listing, and its beds with it. **Write-side** — calls Airbnb upstream. Pass the Airbnb-side room id as `?roomId=`. Requires a connected Airbnb host, else `404 no_connection`. The room is proven to belong to the listing named in the path first; a room from another listing returns `404`. Both stored copies drop the room on success — `stored` reports whether that succeeded. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
446
665
|
# @param id [String] Repull listing id (numeric string).
|
|
447
666
|
# @param room_id [String] Airbnb-side room id to delete.
|
|
448
667
|
# @param [Hash] opts the optional parameters
|
|
449
|
-
# @return [Array<(
|
|
668
|
+
# @return [Array<(DeleteAirbnbListingRoom200Response, Integer, Hash)>] DeleteAirbnbListingRoom200Response data, response status code and response headers
|
|
450
669
|
def delete_airbnb_listing_room_with_http_info(id, room_id, opts = {})
|
|
451
670
|
if @api_client.config.debugging
|
|
452
671
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.delete_airbnb_listing_room ...'
|
|
@@ -478,7 +697,7 @@ module Repull
|
|
|
478
697
|
post_body = opts[:debug_body]
|
|
479
698
|
|
|
480
699
|
# return_type
|
|
481
|
-
return_type = opts[:debug_return_type] || '
|
|
700
|
+
return_type = opts[:debug_return_type] || 'DeleteAirbnbListingRoom200Response'
|
|
482
701
|
|
|
483
702
|
# auth_names
|
|
484
703
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -501,7 +720,7 @@ module Repull
|
|
|
501
720
|
end
|
|
502
721
|
|
|
503
722
|
# Edit Airbnb host review
|
|
504
|
-
# Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (`PUT /v2/listing_reviews/{id}`), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial `AirbnbReview` — pass the fields you want to change (rating, public review, private feedback, category ratings).
|
|
723
|
+
# Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (`PUT /v2/listing_reviews/{id}`), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial `AirbnbReview` — pass the fields you want to change (rating, public review, private feedback, category ratings). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
505
724
|
# @param id [String] Airbnb review id (`HRabc123` style).
|
|
506
725
|
# @param airbnb_review [AirbnbReview]
|
|
507
726
|
# @param [Hash] opts the optional parameters
|
|
@@ -512,7 +731,7 @@ module Repull
|
|
|
512
731
|
end
|
|
513
732
|
|
|
514
733
|
# Edit Airbnb host review
|
|
515
|
-
# Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (`PUT /v2/listing_reviews/{id}`), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial `AirbnbReview` — pass the fields you want to change (rating, public review, private feedback, category ratings).
|
|
734
|
+
# Edit a host-side review for an Airbnb stay. Airbnb collapses POST + PUT into the same upstream call (`PUT /v2/listing_reviews/{id}`), so this endpoint covers both initial submit and subsequent edits while the review window is open. Body is a partial `AirbnbReview` — pass the fields you want to change (rating, public review, private feedback, category ratings). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
516
735
|
# @param id [String] Airbnb review id (`HRabc123` style).
|
|
517
736
|
# @param airbnb_review [AirbnbReview]
|
|
518
737
|
# @param [Hash] opts the optional parameters
|
|
@@ -575,7 +794,7 @@ module Repull
|
|
|
575
794
|
end
|
|
576
795
|
|
|
577
796
|
# Get Airbnb alteration
|
|
578
|
-
# Fetch a single Airbnb reservation alteration by its Airbnb alteration id. **Pure DB read**, workspace-scoped via the reservations join. Returns `404 not_found` when no alteration matches the id in your workspace.
|
|
797
|
+
# Fetch a single Airbnb reservation alteration by its Airbnb alteration id. **Pure DB read**, workspace-scoped via the reservations join. Returns `404 not_found` when no alteration matches the id in your workspace. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
579
798
|
# @param id [String] Airbnb alteration id.
|
|
580
799
|
# @param [Hash] opts the optional parameters
|
|
581
800
|
# @return [GetAirbnbAlteration200Response]
|
|
@@ -585,7 +804,7 @@ module Repull
|
|
|
585
804
|
end
|
|
586
805
|
|
|
587
806
|
# Get Airbnb alteration
|
|
588
|
-
# Fetch a single Airbnb reservation alteration by its Airbnb alteration id. **Pure DB read**, workspace-scoped via the reservations join. Returns `404 not_found` when no alteration matches the id in your workspace.
|
|
807
|
+
# Fetch a single Airbnb reservation alteration by its Airbnb alteration id. **Pure DB read**, workspace-scoped via the reservations join. Returns `404 not_found` when no alteration matches the id in your workspace. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
589
808
|
# @param id [String] Airbnb alteration id.
|
|
590
809
|
# @param [Hash] opts the optional parameters
|
|
591
810
|
# @return [Array<(GetAirbnbAlteration200Response, Integer, Hash)>] GetAirbnbAlteration200Response data, response status code and response headers
|
|
@@ -637,23 +856,86 @@ module Repull
|
|
|
637
856
|
return data, status_code, headers
|
|
638
857
|
end
|
|
639
858
|
|
|
859
|
+
# Get Airbnb booking settings
|
|
860
|
+
# Read how an Airbnb listing takes bookings and what happens when a guest cancels: booking mode, Instant Book state, the good-track-record requirement, check-in/check-out times, advance notice, preparation time, booking window, the short-stay and long-stay cancellation policies, and the non-refundable option. **This is Repull's stored copy, not a live call to Airbnb.** Values come from the local Airbnb mirror that the sync workers fill, so the response always carries `dataFreshness` — check `dataFreshness.stale` (and `dataFreshness.accounts[]` when the workspace has several Airbnb accounts) before treating a value as current. **Not exposed by Airbnb.** The pre-reservation message and automatic stay extension have no field on Airbnb's `booking_settings` resource, so neither can be read or written here; set the pre-reservation message in the Airbnb host dashboard, and handle extensions through `/v1/channels/airbnb/alterations`. Airbnb also expresses the same-day cutoff only as whole hours of advance notice, so `advanceNotice.hours` is as precise as the cutoff gets. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive — an inactive listing keeps syncing but cannot be read or changed through the API until it is activated.
|
|
861
|
+
# @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
|
|
862
|
+
# @param [Hash] opts the optional parameters
|
|
863
|
+
# @return [GetAirbnbBookingSettings200Response]
|
|
864
|
+
def get_airbnb_booking_settings(id, opts = {})
|
|
865
|
+
data, _status_code, _headers = get_airbnb_booking_settings_with_http_info(id, opts)
|
|
866
|
+
data
|
|
867
|
+
end
|
|
868
|
+
|
|
869
|
+
# Get Airbnb booking settings
|
|
870
|
+
# Read how an Airbnb listing takes bookings and what happens when a guest cancels: booking mode, Instant Book state, the good-track-record requirement, check-in/check-out times, advance notice, preparation time, booking window, the short-stay and long-stay cancellation policies, and the non-refundable option. **This is Repull's stored copy, not a live call to Airbnb.** Values come from the local Airbnb mirror that the sync workers fill, so the response always carries `dataFreshness` — check `dataFreshness.stale` (and `dataFreshness.accounts[]` when the workspace has several Airbnb accounts) before treating a value as current. **Not exposed by Airbnb.** The pre-reservation message and automatic stay extension have no field on Airbnb's `booking_settings` resource, so neither can be read or written here; set the pre-reservation message in the Airbnb host dashboard, and handle extensions through `/v1/channels/airbnb/alterations`. Airbnb also expresses the same-day cutoff only as whole hours of advance notice, so `advanceNotice.hours` is as precise as the cutoff gets. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive — an inactive listing keeps syncing but cannot be read or changed through the API until it is activated.
|
|
871
|
+
# @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
|
|
872
|
+
# @param [Hash] opts the optional parameters
|
|
873
|
+
# @return [Array<(GetAirbnbBookingSettings200Response, Integer, Hash)>] GetAirbnbBookingSettings200Response data, response status code and response headers
|
|
874
|
+
def get_airbnb_booking_settings_with_http_info(id, opts = {})
|
|
875
|
+
if @api_client.config.debugging
|
|
876
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_booking_settings ...'
|
|
877
|
+
end
|
|
878
|
+
# verify the required parameter 'id' is set
|
|
879
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
880
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_booking_settings"
|
|
881
|
+
end
|
|
882
|
+
# resource path
|
|
883
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/booking-settings'.sub('{id}', CGI.escape(id.to_s))
|
|
884
|
+
|
|
885
|
+
# query parameters
|
|
886
|
+
query_params = opts[:query_params] || {}
|
|
887
|
+
|
|
888
|
+
# header parameters
|
|
889
|
+
header_params = opts[:header_params] || {}
|
|
890
|
+
# HTTP header 'Accept' (if needed)
|
|
891
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
892
|
+
|
|
893
|
+
# form parameters
|
|
894
|
+
form_params = opts[:form_params] || {}
|
|
895
|
+
|
|
896
|
+
# http body (model)
|
|
897
|
+
post_body = opts[:debug_body]
|
|
898
|
+
|
|
899
|
+
# return_type
|
|
900
|
+
return_type = opts[:debug_return_type] || 'GetAirbnbBookingSettings200Response'
|
|
901
|
+
|
|
902
|
+
# auth_names
|
|
903
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
904
|
+
|
|
905
|
+
new_options = opts.merge(
|
|
906
|
+
:operation => :"AirbnbApi.get_airbnb_booking_settings",
|
|
907
|
+
:header_params => header_params,
|
|
908
|
+
:query_params => query_params,
|
|
909
|
+
:form_params => form_params,
|
|
910
|
+
:body => post_body,
|
|
911
|
+
:auth_names => auth_names,
|
|
912
|
+
:return_type => return_type
|
|
913
|
+
)
|
|
914
|
+
|
|
915
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
916
|
+
if @api_client.config.debugging
|
|
917
|
+
@api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_booking_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
918
|
+
end
|
|
919
|
+
return data, status_code, headers
|
|
920
|
+
end
|
|
921
|
+
|
|
640
922
|
# Get Airbnb check-in guide
|
|
641
|
-
# Return every published locale variant of an Airbnb listing's check-in guide. **Pure DB read** from `listings_airbnb_check_in_guides`. Pass `?locale=en` to filter to one locale (prefix match). Returns `404` when the listing has no Airbnb connection in this workspace.
|
|
923
|
+
# Return every published locale variant of an Airbnb listing's check-in guide. **Pure DB read** from `listings_airbnb_check_in_guides`. Pass `?locale=en` to filter to one locale (prefix match). Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
642
924
|
# @param id [String] Repull listing id (numeric string).
|
|
643
925
|
# @param [Hash] opts the optional parameters
|
|
644
926
|
# @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
|
|
645
|
-
# @return [
|
|
927
|
+
# @return [GetAirbnbCheckinGuide200Response]
|
|
646
928
|
def get_airbnb_checkin_guide(id, opts = {})
|
|
647
929
|
data, _status_code, _headers = get_airbnb_checkin_guide_with_http_info(id, opts)
|
|
648
930
|
data
|
|
649
931
|
end
|
|
650
932
|
|
|
651
933
|
# Get Airbnb check-in guide
|
|
652
|
-
# Return every published locale variant of an Airbnb listing's check-in guide. **Pure DB read** from `listings_airbnb_check_in_guides`. Pass `?locale=en` to filter to one locale (prefix match). Returns `404` when the listing has no Airbnb connection in this workspace.
|
|
934
|
+
# Return every published locale variant of an Airbnb listing's check-in guide. **Pure DB read** from `listings_airbnb_check_in_guides`. Pass `?locale=en` to filter to one locale (prefix match). Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
653
935
|
# @param id [String] Repull listing id (numeric string).
|
|
654
936
|
# @param [Hash] opts the optional parameters
|
|
655
937
|
# @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
|
|
656
|
-
# @return [Array<(
|
|
938
|
+
# @return [Array<(GetAirbnbCheckinGuide200Response, Integer, Hash)>] GetAirbnbCheckinGuide200Response data, response status code and response headers
|
|
657
939
|
def get_airbnb_checkin_guide_with_http_info(id, opts = {})
|
|
658
940
|
if @api_client.config.debugging
|
|
659
941
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_checkin_guide ...'
|
|
@@ -681,7 +963,7 @@ module Repull
|
|
|
681
963
|
post_body = opts[:debug_body]
|
|
682
964
|
|
|
683
965
|
# return_type
|
|
684
|
-
return_type = opts[:debug_return_type] || '
|
|
966
|
+
return_type = opts[:debug_return_type] || 'GetAirbnbCheckinGuide200Response'
|
|
685
967
|
|
|
686
968
|
# auth_names
|
|
687
969
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -704,20 +986,20 @@ module Repull
|
|
|
704
986
|
end
|
|
705
987
|
|
|
706
988
|
# Get Airbnb checkout guide
|
|
707
|
-
# Return the checkout tasks an Airbnb listing shows guests at departure. **Pure DB read** from `listings_airbnb_checkout_tasks`. Returns `404` when the listing has no Airbnb connection in this workspace.
|
|
989
|
+
# Return the checkout tasks an Airbnb listing shows guests at departure. **Pure DB read** from `listings_airbnb_checkout_tasks`. Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
708
990
|
# @param id [String] Repull listing id (numeric string).
|
|
709
991
|
# @param [Hash] opts the optional parameters
|
|
710
|
-
# @return [
|
|
992
|
+
# @return [GetAirbnbCheckinGuide200Response]
|
|
711
993
|
def get_airbnb_checkout_guide(id, opts = {})
|
|
712
994
|
data, _status_code, _headers = get_airbnb_checkout_guide_with_http_info(id, opts)
|
|
713
995
|
data
|
|
714
996
|
end
|
|
715
997
|
|
|
716
998
|
# Get Airbnb checkout guide
|
|
717
|
-
# Return the checkout tasks an Airbnb listing shows guests at departure. **Pure DB read** from `listings_airbnb_checkout_tasks`. Returns `404` when the listing has no Airbnb connection in this workspace.
|
|
999
|
+
# Return the checkout tasks an Airbnb listing shows guests at departure. **Pure DB read** from `listings_airbnb_checkout_tasks`. Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
718
1000
|
# @param id [String] Repull listing id (numeric string).
|
|
719
1001
|
# @param [Hash] opts the optional parameters
|
|
720
|
-
# @return [Array<(
|
|
1002
|
+
# @return [Array<(GetAirbnbCheckinGuide200Response, Integer, Hash)>] GetAirbnbCheckinGuide200Response data, response status code and response headers
|
|
721
1003
|
def get_airbnb_checkout_guide_with_http_info(id, opts = {})
|
|
722
1004
|
if @api_client.config.debugging
|
|
723
1005
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_checkout_guide ...'
|
|
@@ -744,7 +1026,7 @@ module Repull
|
|
|
744
1026
|
post_body = opts[:debug_body]
|
|
745
1027
|
|
|
746
1028
|
# return_type
|
|
747
|
-
return_type = opts[:debug_return_type] || '
|
|
1029
|
+
return_type = opts[:debug_return_type] || 'GetAirbnbCheckinGuide200Response'
|
|
748
1030
|
|
|
749
1031
|
# auth_names
|
|
750
1032
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -824,7 +1106,7 @@ module Repull
|
|
|
824
1106
|
end
|
|
825
1107
|
|
|
826
1108
|
# Get Airbnb listing
|
|
827
|
-
# Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts — every match is returned. Pass `?include=amenities` to enrich each row with its current Airbnb amenities.
|
|
1109
|
+
# Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts — every match is returned. Pass `?include=amenities` to enrich each row with its current Airbnb amenities. Each row carries `syncCategory` — Airbnb's own per-listing API sync decision (`sync_all`, `sync_rates_and_availability`, or `none`) — and `writable`, which is `false` exactly when that category is `none`, meaning Airbnb refuses every write to the listing and Repull returns `403 listing_not_api_connected` without sending anything. `GET /v1/channels/airbnb/listings` reports both fields for the whole portfolio in one call. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
828
1110
|
# @param id [String]
|
|
829
1111
|
# @param [Hash] opts the optional parameters
|
|
830
1112
|
# @option opts [String] :include Comma-separated expansions. Currently supported: `amenities`.
|
|
@@ -835,7 +1117,7 @@ module Repull
|
|
|
835
1117
|
end
|
|
836
1118
|
|
|
837
1119
|
# Get Airbnb listing
|
|
838
|
-
# Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts — every match is returned. Pass `?include=amenities` to enrich each row with its current Airbnb amenities.
|
|
1120
|
+
# Fetch all Airbnb connection rows for a single Vanio listing id. A property may be linked from multiple Airbnb hosts — every match is returned. Pass `?include=amenities` to enrich each row with its current Airbnb amenities. Each row carries `syncCategory` — Airbnb's own per-listing API sync decision (`sync_all`, `sync_rates_and_availability`, or `none`) — and `writable`, which is `false` exactly when that category is `none`, meaning Airbnb refuses every write to the listing and Repull returns `403 listing_not_api_connected` without sending anything. `GET /v1/channels/airbnb/listings` reports both fields for the whole portfolio in one call. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
839
1121
|
# @param id [String]
|
|
840
1122
|
# @param [Hash] opts the optional parameters
|
|
841
1123
|
# @option opts [String] :include Comma-separated expansions. Currently supported: `amenities`.
|
|
@@ -890,7 +1172,7 @@ module Repull
|
|
|
890
1172
|
end
|
|
891
1173
|
|
|
892
1174
|
# Get Airbnb availability
|
|
893
|
-
# Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
|
|
1175
|
+
# Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
894
1176
|
# @param id [String]
|
|
895
1177
|
# @param [Hash] opts the optional parameters
|
|
896
1178
|
# @return [nil]
|
|
@@ -900,7 +1182,7 @@ module Repull
|
|
|
900
1182
|
end
|
|
901
1183
|
|
|
902
1184
|
# Get Airbnb availability
|
|
903
|
-
# Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status.
|
|
1185
|
+
# Read the per-day availability calendar for an Airbnb listing. Returns one row per day including price overrides, min-stay, and blocked status. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
904
1186
|
# @param id [String]
|
|
905
1187
|
# @param [Hash] opts the optional parameters
|
|
906
1188
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -920,6 +1202,8 @@ module Repull
|
|
|
920
1202
|
|
|
921
1203
|
# header parameters
|
|
922
1204
|
header_params = opts[:header_params] || {}
|
|
1205
|
+
# HTTP header 'Accept' (if needed)
|
|
1206
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
923
1207
|
|
|
924
1208
|
# form parameters
|
|
925
1209
|
form_params = opts[:form_params] || {}
|
|
@@ -950,37 +1234,39 @@ module Repull
|
|
|
950
1234
|
return data, status_code, headers
|
|
951
1235
|
end
|
|
952
1236
|
|
|
953
|
-
# Get Airbnb
|
|
954
|
-
#
|
|
955
|
-
# @param id [String]
|
|
1237
|
+
# Get Airbnb listing details
|
|
1238
|
+
# What kind of property Airbnb thinks this is — property type group and category, room type, capacity — plus the check-in method (`checkInOption`), whether the listing is live (`hasAvailability`), and **`lockedFields`: the attributes Airbnb refuses to change on this listing**. **Pure DB read** from the local mirror, one entry per Airbnb connection. Read `lockedFields` before a content write. Airbnb does not refuse a write to a locked attribute: it returns 200, reports the attribute as locked, and applies nothing — which is why a write can look successful and change nothing. 1,180 of 5,917 synced listings carry at least one locked attribute. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
|
|
1239
|
+
# @param id [String] Repull listing id (numeric string).
|
|
956
1240
|
# @param [Hash] opts the optional parameters
|
|
957
|
-
# @return [
|
|
958
|
-
def
|
|
959
|
-
|
|
960
|
-
|
|
1241
|
+
# @return [GetAirbnbListingDetails200Response]
|
|
1242
|
+
def get_airbnb_listing_details(id, opts = {})
|
|
1243
|
+
data, _status_code, _headers = get_airbnb_listing_details_with_http_info(id, opts)
|
|
1244
|
+
data
|
|
961
1245
|
end
|
|
962
1246
|
|
|
963
|
-
# Get Airbnb
|
|
964
|
-
#
|
|
965
|
-
# @param id [String]
|
|
1247
|
+
# Get Airbnb listing details
|
|
1248
|
+
# What kind of property Airbnb thinks this is — property type group and category, room type, capacity — plus the check-in method (`checkInOption`), whether the listing is live (`hasAvailability`), and **`lockedFields`: the attributes Airbnb refuses to change on this listing**. **Pure DB read** from the local mirror, one entry per Airbnb connection. Read `lockedFields` before a content write. Airbnb does not refuse a write to a locked attribute: it returns 200, reports the attribute as locked, and applies nothing — which is why a write can look successful and change nothing. 1,180 of 5,917 synced listings carry at least one locked attribute. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
|
|
1249
|
+
# @param id [String] Repull listing id (numeric string).
|
|
966
1250
|
# @param [Hash] opts the optional parameters
|
|
967
|
-
# @return [Array<(
|
|
968
|
-
def
|
|
1251
|
+
# @return [Array<(GetAirbnbListingDetails200Response, Integer, Hash)>] GetAirbnbListingDetails200Response data, response status code and response headers
|
|
1252
|
+
def get_airbnb_listing_details_with_http_info(id, opts = {})
|
|
969
1253
|
if @api_client.config.debugging
|
|
970
|
-
@api_client.config.logger.debug 'Calling API: AirbnbApi.
|
|
1254
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_details ...'
|
|
971
1255
|
end
|
|
972
1256
|
# verify the required parameter 'id' is set
|
|
973
1257
|
if @api_client.config.client_side_validation && id.nil?
|
|
974
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.
|
|
1258
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_details"
|
|
975
1259
|
end
|
|
976
1260
|
# resource path
|
|
977
|
-
local_var_path = '/v1/channels/airbnb/listings/{id}/
|
|
1261
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/details'.sub('{id}', CGI.escape(id.to_s))
|
|
978
1262
|
|
|
979
1263
|
# query parameters
|
|
980
1264
|
query_params = opts[:query_params] || {}
|
|
981
1265
|
|
|
982
1266
|
# header parameters
|
|
983
1267
|
header_params = opts[:header_params] || {}
|
|
1268
|
+
# HTTP header 'Accept' (if needed)
|
|
1269
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
984
1270
|
|
|
985
1271
|
# form parameters
|
|
986
1272
|
form_params = opts[:form_params] || {}
|
|
@@ -989,13 +1275,13 @@ module Repull
|
|
|
989
1275
|
post_body = opts[:debug_body]
|
|
990
1276
|
|
|
991
1277
|
# return_type
|
|
992
|
-
return_type = opts[:debug_return_type]
|
|
1278
|
+
return_type = opts[:debug_return_type] || 'GetAirbnbListingDetails200Response'
|
|
993
1279
|
|
|
994
1280
|
# auth_names
|
|
995
1281
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
996
1282
|
|
|
997
1283
|
new_options = opts.merge(
|
|
998
|
-
:operation => :"AirbnbApi.
|
|
1284
|
+
:operation => :"AirbnbApi.get_airbnb_listing_details",
|
|
999
1285
|
:header_params => header_params,
|
|
1000
1286
|
:query_params => query_params,
|
|
1001
1287
|
:form_params => form_params,
|
|
@@ -1006,24 +1292,87 @@ module Repull
|
|
|
1006
1292
|
|
|
1007
1293
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1008
1294
|
if @api_client.config.debugging
|
|
1009
|
-
@api_client.config.logger.debug "API called: AirbnbApi#
|
|
1295
|
+
@api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1010
1296
|
end
|
|
1011
1297
|
return data, status_code, headers
|
|
1012
1298
|
end
|
|
1013
1299
|
|
|
1014
|
-
# Get Airbnb
|
|
1015
|
-
#
|
|
1016
|
-
# @param id [String]
|
|
1300
|
+
# Get Airbnb pricing
|
|
1301
|
+
# Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1302
|
+
# @param id [String]
|
|
1017
1303
|
# @param [Hash] opts the optional parameters
|
|
1018
|
-
# @
|
|
1019
|
-
|
|
1020
|
-
|
|
1304
|
+
# @return [nil]
|
|
1305
|
+
def get_airbnb_listing_pricing(id, opts = {})
|
|
1306
|
+
get_airbnb_listing_pricing_with_http_info(id, opts)
|
|
1307
|
+
nil
|
|
1308
|
+
end
|
|
1309
|
+
|
|
1310
|
+
# Get Airbnb pricing
|
|
1311
|
+
# Read the current pricing config (base price, weekend uplift, length-of-stay discounts, smart-pricing bounds) for an Airbnb listing. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1312
|
+
# @param id [String]
|
|
1313
|
+
# @param [Hash] opts the optional parameters
|
|
1314
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1315
|
+
def get_airbnb_listing_pricing_with_http_info(id, opts = {})
|
|
1316
|
+
if @api_client.config.debugging
|
|
1317
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.get_airbnb_listing_pricing ...'
|
|
1318
|
+
end
|
|
1319
|
+
# verify the required parameter 'id' is set
|
|
1320
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1321
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.get_airbnb_listing_pricing"
|
|
1322
|
+
end
|
|
1323
|
+
# resource path
|
|
1324
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/pricing'.sub('{id}', CGI.escape(id.to_s))
|
|
1325
|
+
|
|
1326
|
+
# query parameters
|
|
1327
|
+
query_params = opts[:query_params] || {}
|
|
1328
|
+
|
|
1329
|
+
# header parameters
|
|
1330
|
+
header_params = opts[:header_params] || {}
|
|
1331
|
+
# HTTP header 'Accept' (if needed)
|
|
1332
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1333
|
+
|
|
1334
|
+
# form parameters
|
|
1335
|
+
form_params = opts[:form_params] || {}
|
|
1336
|
+
|
|
1337
|
+
# http body (model)
|
|
1338
|
+
post_body = opts[:debug_body]
|
|
1339
|
+
|
|
1340
|
+
# return_type
|
|
1341
|
+
return_type = opts[:debug_return_type]
|
|
1342
|
+
|
|
1343
|
+
# auth_names
|
|
1344
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1345
|
+
|
|
1346
|
+
new_options = opts.merge(
|
|
1347
|
+
:operation => :"AirbnbApi.get_airbnb_listing_pricing",
|
|
1348
|
+
:header_params => header_params,
|
|
1349
|
+
:query_params => query_params,
|
|
1350
|
+
:form_params => form_params,
|
|
1351
|
+
:body => post_body,
|
|
1352
|
+
:auth_names => auth_names,
|
|
1353
|
+
:return_type => return_type
|
|
1354
|
+
)
|
|
1355
|
+
|
|
1356
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1357
|
+
if @api_client.config.debugging
|
|
1358
|
+
@api_client.config.logger.debug "API called: AirbnbApi#get_airbnb_listing_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1359
|
+
end
|
|
1360
|
+
return data, status_code, headers
|
|
1361
|
+
end
|
|
1362
|
+
|
|
1363
|
+
# Get Airbnb listing quality
|
|
1364
|
+
# Return an Airbnb listing's quality signals — standards, reservation issues, and monthly quality stats. **Pure DB read** from the local quality mirrors. Scope the response with `?type=all|standards|issues|stats` (default `all`, which returns `{ standards, issues }`). Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1365
|
+
# @param id [String] Repull listing id (numeric string).
|
|
1366
|
+
# @param [Hash] opts the optional parameters
|
|
1367
|
+
# @option opts [String] :type Which quality slice to return. `all` returns `{ standards, issues }`. (default to 'all')
|
|
1368
|
+
# @return [GetAirbnbListingQuality200Response]
|
|
1369
|
+
def get_airbnb_listing_quality(id, opts = {})
|
|
1021
1370
|
data, _status_code, _headers = get_airbnb_listing_quality_with_http_info(id, opts)
|
|
1022
1371
|
data
|
|
1023
1372
|
end
|
|
1024
1373
|
|
|
1025
1374
|
# Get Airbnb listing quality
|
|
1026
|
-
# Return an Airbnb listing's quality signals — standards, reservation issues, and monthly quality stats. **Pure DB read** from the local quality mirrors. Scope the response with `?type=all|standards|issues|stats` (default `all`, which returns `{ standards, issues }`). Returns `404` when the listing has no Airbnb connection in this workspace.
|
|
1375
|
+
# Return an Airbnb listing's quality signals — standards, reservation issues, and monthly quality stats. **Pure DB read** from the local quality mirrors. Scope the response with `?type=all|standards|issues|stats` (default `all`, which returns `{ standards, issues }`). Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1027
1376
|
# @param id [String] Repull listing id (numeric string).
|
|
1028
1377
|
# @param [Hash] opts the optional parameters
|
|
1029
1378
|
# @option opts [String] :type Which quality slice to return. `all` returns `{ standards, issues }`. (default to 'all')
|
|
@@ -1082,7 +1431,7 @@ module Repull
|
|
|
1082
1431
|
end
|
|
1083
1432
|
|
|
1084
1433
|
# Get Airbnb listing settings
|
|
1085
|
-
# Return an Airbnb listing's host roles, published locales, and regulatory permits. **Pure DB read** — host roles from `listings_airbnb_details.host_roles`, locales from distinct `listings_airbnb_descriptions.locale`, permits from `listings_airbnb_permits`. Scope with `?type=all|hosts|permits|locales` (default `all`, which returns `{ hosts, locales }`). Returns `404` when the listing has no Airbnb connection in this workspace.
|
|
1434
|
+
# Return an Airbnb listing's host roles, published locales, and regulatory permits. **Pure DB read** — host roles from `listings_airbnb_details.host_roles`, locales from distinct `listings_airbnb_descriptions.locale`, permits from `listings_airbnb_permits`. Scope with `?type=all|hosts|permits|locales` (default `all`, which returns `{ hosts, locales }`). Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1086
1435
|
# @param id [String] Repull listing id (numeric string).
|
|
1087
1436
|
# @param [Hash] opts the optional parameters
|
|
1088
1437
|
# @option opts [String] :type Which settings slice to return. `all` returns `{ hosts, locales }`. (default to 'all')
|
|
@@ -1093,7 +1442,7 @@ module Repull
|
|
|
1093
1442
|
end
|
|
1094
1443
|
|
|
1095
1444
|
# Get Airbnb listing settings
|
|
1096
|
-
# Return an Airbnb listing's host roles, published locales, and regulatory permits. **Pure DB read** — host roles from `listings_airbnb_details.host_roles`, locales from distinct `listings_airbnb_descriptions.locale`, permits from `listings_airbnb_permits`. Scope with `?type=all|hosts|permits|locales` (default `all`, which returns `{ hosts, locales }`). Returns `404` when the listing has no Airbnb connection in this workspace.
|
|
1445
|
+
# Return an Airbnb listing's host roles, published locales, and regulatory permits. **Pure DB read** — host roles from `listings_airbnb_details.host_roles`, locales from distinct `listings_airbnb_descriptions.locale`, permits from `listings_airbnb_permits`. Scope with `?type=all|hosts|permits|locales` (default `all`, which returns `{ hosts, locales }`). Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1097
1446
|
# @param id [String] Repull listing id (numeric string).
|
|
1098
1447
|
# @param [Hash] opts the optional parameters
|
|
1099
1448
|
# @option opts [String] :type Which settings slice to return. `all` returns `{ hosts, locales }`. (default to 'all')
|
|
@@ -1152,7 +1501,7 @@ module Repull
|
|
|
1152
1501
|
end
|
|
1153
1502
|
|
|
1154
1503
|
# Get Airbnb reservation
|
|
1155
|
-
# Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`).
|
|
1504
|
+
# Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1156
1505
|
# @param code [String]
|
|
1157
1506
|
# @param [Hash] opts the optional parameters
|
|
1158
1507
|
# @return [AirbnbReservation]
|
|
@@ -1162,7 +1511,7 @@ module Repull
|
|
|
1162
1511
|
end
|
|
1163
1512
|
|
|
1164
1513
|
# Get Airbnb reservation
|
|
1165
|
-
# Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`).
|
|
1514
|
+
# Fetch a single Airbnb reservation by Airbnb confirmation code (e.g. `HMABCDEF12`). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1166
1515
|
# @param code [String]
|
|
1167
1516
|
# @param [Hash] opts the optional parameters
|
|
1168
1517
|
# @return [Array<(AirbnbReservation, Integer, Hash)>] AirbnbReservation data, response status code and response headers
|
|
@@ -1215,7 +1564,7 @@ module Repull
|
|
|
1215
1564
|
end
|
|
1216
1565
|
|
|
1217
1566
|
# Get Airbnb thread
|
|
1218
|
-
# Fetch a single Airbnb message thread by its Airbnb thread id. **Pure DB read** from the local `message_threads` mirror, workspace-scoped. Returns `404 not_found` when no thread matches. For the messages within a thread use `GET /v1/channels/airbnb/messaging/{threadId}/messages`.
|
|
1567
|
+
# Fetch a single Airbnb message thread by its Airbnb thread id. **Pure DB read** from the local `message_threads` mirror, workspace-scoped. Returns `404 not_found` when no thread matches. For the messages within a thread use `GET /v1/channels/airbnb/messaging/{threadId}/messages`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1219
1568
|
# @param thread_id [String] Airbnb thread id (matches the external thread id).
|
|
1220
1569
|
# @param [Hash] opts the optional parameters
|
|
1221
1570
|
# @return [GetAirbnbThread200Response]
|
|
@@ -1225,7 +1574,7 @@ module Repull
|
|
|
1225
1574
|
end
|
|
1226
1575
|
|
|
1227
1576
|
# Get Airbnb thread
|
|
1228
|
-
# Fetch a single Airbnb message thread by its Airbnb thread id. **Pure DB read** from the local `message_threads` mirror, workspace-scoped. Returns `404 not_found` when no thread matches. For the messages within a thread use `GET /v1/channels/airbnb/messaging/{threadId}/messages`.
|
|
1577
|
+
# Fetch a single Airbnb message thread by its Airbnb thread id. **Pure DB read** from the local `message_threads` mirror, workspace-scoped. Returns `404 not_found` when no thread matches. For the messages within a thread use `GET /v1/channels/airbnb/messaging/{threadId}/messages`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1229
1578
|
# @param thread_id [String] Airbnb thread id (matches the external thread id).
|
|
1230
1579
|
# @param [Hash] opts the optional parameters
|
|
1231
1580
|
# @return [Array<(GetAirbnbThread200Response, Integer, Hash)>] GetAirbnbThread200Response data, response status code and response headers
|
|
@@ -1278,8 +1627,9 @@ module Repull
|
|
|
1278
1627
|
end
|
|
1279
1628
|
|
|
1280
1629
|
# List Airbnb alterations
|
|
1281
|
-
# List reservation alteration requests for Airbnb reservations in this workspace. **Pure DB read** from the local `reservation_alterations` mirror — never calls Airbnb upstream — scoped to your workspace via the reservations join. Default returns only pending alterations; pass `?type=all` for the full history. Filter to a single reservation with `?reservation_code=<confirmation code>`. Every response carries the `
|
|
1630
|
+
# List reservation alteration requests for Airbnb reservations in this workspace. **Pure DB read** from the local `reservation_alterations` mirror — never calls Airbnb upstream — scoped to your workspace via the reservations join. Default returns only pending alterations; pass `?type=all` for the full history. Filter to a single reservation with `?reservation_code=<confirmation code>`. Every response carries the `dataFreshness` envelope. Each row carries the proposed change in its `new*` fields. A **listing transfer** shows up as `newListingId` (Repull listing id) and `newAirbnbListingId` (Airbnb's own id); both are `null` when the alteration does not move the reservation. Alterations of reservations on inactive listings are left out. Filtering by a reservation on an inactive listing (`reservation_code`) returns `403 listing_inactive`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1282
1631
|
# @param [Hash] opts the optional parameters
|
|
1632
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
1283
1633
|
# @option opts [String] :type Scope: `pending` (default) returns only alterations awaiting a decision; `all` returns every alteration. (default to 'pending')
|
|
1284
1634
|
# @option opts [String] :reservation_code Airbnb confirmation code — restricts results to a single reservation. Returns an empty array when no reservation matches within your workspace.
|
|
1285
1635
|
# @return [ListAirbnbAlterations200Response]
|
|
@@ -1289,8 +1639,9 @@ module Repull
|
|
|
1289
1639
|
end
|
|
1290
1640
|
|
|
1291
1641
|
# List Airbnb alterations
|
|
1292
|
-
# List reservation alteration requests for Airbnb reservations in this workspace. **Pure DB read** from the local `reservation_alterations` mirror — never calls Airbnb upstream — scoped to your workspace via the reservations join. Default returns only pending alterations; pass `?type=all` for the full history. Filter to a single reservation with `?reservation_code=<confirmation code>`. Every response carries the `
|
|
1642
|
+
# List reservation alteration requests for Airbnb reservations in this workspace. **Pure DB read** from the local `reservation_alterations` mirror — never calls Airbnb upstream — scoped to your workspace via the reservations join. Default returns only pending alterations; pass `?type=all` for the full history. Filter to a single reservation with `?reservation_code=<confirmation code>`. Every response carries the `dataFreshness` envelope. Each row carries the proposed change in its `new*` fields. A **listing transfer** shows up as `newListingId` (Repull listing id) and `newAirbnbListingId` (Airbnb's own id); both are `null` when the alteration does not move the reservation. Alterations of reservations on inactive listings are left out. Filtering by a reservation on an inactive listing (`reservation_code`) returns `403 listing_inactive`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1293
1643
|
# @param [Hash] opts the optional parameters
|
|
1644
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
1294
1645
|
# @option opts [String] :type Scope: `pending` (default) returns only alterations awaiting a decision; `all` returns every alteration. (default to 'pending')
|
|
1295
1646
|
# @option opts [String] :reservation_code Airbnb confirmation code — restricts results to a single reservation. Returns an empty array when no reservation matches within your workspace.
|
|
1296
1647
|
# @return [Array<(ListAirbnbAlterations200Response, Integer, Hash)>] ListAirbnbAlterations200Response data, response status code and response headers
|
|
@@ -1307,6 +1658,7 @@ module Repull
|
|
|
1307
1658
|
|
|
1308
1659
|
# query parameters
|
|
1309
1660
|
query_params = opts[:query_params] || {}
|
|
1661
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
1310
1662
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
1311
1663
|
query_params[:'reservation_code'] = opts[:'reservation_code'] if !opts[:'reservation_code'].nil?
|
|
1312
1664
|
|
|
@@ -1345,7 +1697,7 @@ module Repull
|
|
|
1345
1697
|
end
|
|
1346
1698
|
|
|
1347
1699
|
# List Airbnb amenities
|
|
1348
|
-
# List an Airbnb listing's amenities. **Pure DB read** from the local `listings_airbnb_amenities` cache — never calls Airbnb upstream. The response splits amenities into `amenities` (regular) and `accessibility_amenities` (step-free access, wide doorways, grab rails, disabled parking, wheelchair, accessible-height fixtures, hoists, etc). Both are arrays (`[]` when none). Consult `
|
|
1700
|
+
# List an Airbnb listing's amenities. **Pure DB read** from the local `listings_airbnb_amenities` cache — never calls Airbnb upstream. The response splits amenities into `amenities` (regular) and `accessibility_amenities` (step-free access, wide doorways, grab rails, disabled parking, wheelchair, accessible-height fixtures, hoists, etc). Both are arrays (`[]` when none). Consult `dataFreshness` to disambiguate \"never synced\" from \"fresh and genuinely empty\". Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1349
1701
|
# @param id [String] Repull listing id (numeric string).
|
|
1350
1702
|
# @param [Hash] opts the optional parameters
|
|
1351
1703
|
# @return [ListAirbnbListingAmenities200Response]
|
|
@@ -1355,7 +1707,7 @@ module Repull
|
|
|
1355
1707
|
end
|
|
1356
1708
|
|
|
1357
1709
|
# List Airbnb amenities
|
|
1358
|
-
# List an Airbnb listing's amenities. **Pure DB read** from the local `listings_airbnb_amenities` cache — never calls Airbnb upstream. The response splits amenities into `amenities` (regular) and `accessibility_amenities` (step-free access, wide doorways, grab rails, disabled parking, wheelchair, accessible-height fixtures, hoists, etc). Both are arrays (`[]` when none). Consult `
|
|
1710
|
+
# List an Airbnb listing's amenities. **Pure DB read** from the local `listings_airbnb_amenities` cache — never calls Airbnb upstream. The response splits amenities into `amenities` (regular) and `accessibility_amenities` (step-free access, wide doorways, grab rails, disabled parking, wheelchair, accessible-height fixtures, hoists, etc). Both are arrays (`[]` when none). Consult `dataFreshness` to disambiguate \"never synced\" from \"fresh and genuinely empty\". Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1359
1711
|
# @param id [String] Repull listing id (numeric string).
|
|
1360
1712
|
# @param [Hash] opts the optional parameters
|
|
1361
1713
|
# @return [Array<(ListAirbnbListingAmenities200Response, Integer, Hash)>] ListAirbnbListingAmenities200Response data, response status code and response headers
|
|
@@ -1408,24 +1760,24 @@ module Repull
|
|
|
1408
1760
|
end
|
|
1409
1761
|
|
|
1410
1762
|
# List Airbnb descriptions
|
|
1411
|
-
# List an Airbnb listing's per-locale content (name, summary, house rules, etc). **Pure DB read** from `listings_airbnb_descriptions`. Filter to one locale with `?locale=en` (the legacy `?country=` param is accepted as a soft alias). Returns `404` when the listing has no Airbnb connection in this workspace.
|
|
1763
|
+
# List an Airbnb listing's per-locale content (name, summary, house rules, etc). **Pure DB read** from `listings_airbnb_descriptions`. Filter to one locale with `?locale=en` (the legacy `?country=` param is accepted as a soft alias). Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1412
1764
|
# @param id [String] Repull listing id (numeric string).
|
|
1413
1765
|
# @param [Hash] opts the optional parameters
|
|
1414
1766
|
# @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
|
|
1415
1767
|
# @option opts [String] :country Legacy alias for `locale`. Prefer `locale`.
|
|
1416
|
-
# @return [
|
|
1768
|
+
# @return [GetAirbnbCheckinGuide200Response]
|
|
1417
1769
|
def list_airbnb_listing_descriptions(id, opts = {})
|
|
1418
1770
|
data, _status_code, _headers = list_airbnb_listing_descriptions_with_http_info(id, opts)
|
|
1419
1771
|
data
|
|
1420
1772
|
end
|
|
1421
1773
|
|
|
1422
1774
|
# List Airbnb descriptions
|
|
1423
|
-
# List an Airbnb listing's per-locale content (name, summary, house rules, etc). **Pure DB read** from `listings_airbnb_descriptions`. Filter to one locale with `?locale=en` (the legacy `?country=` param is accepted as a soft alias). Returns `404` when the listing has no Airbnb connection in this workspace.
|
|
1775
|
+
# List an Airbnb listing's per-locale content (name, summary, house rules, etc). **Pure DB read** from `listings_airbnb_descriptions`. Filter to one locale with `?locale=en` (the legacy `?country=` param is accepted as a soft alias). Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1424
1776
|
# @param id [String] Repull listing id (numeric string).
|
|
1425
1777
|
# @param [Hash] opts the optional parameters
|
|
1426
1778
|
# @option opts [String] :locale Filter to a single locale (prefix match, case-insensitive).
|
|
1427
1779
|
# @option opts [String] :country Legacy alias for `locale`. Prefer `locale`.
|
|
1428
|
-
# @return [Array<(
|
|
1780
|
+
# @return [Array<(GetAirbnbCheckinGuide200Response, Integer, Hash)>] GetAirbnbCheckinGuide200Response data, response status code and response headers
|
|
1429
1781
|
def list_airbnb_listing_descriptions_with_http_info(id, opts = {})
|
|
1430
1782
|
if @api_client.config.debugging
|
|
1431
1783
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_descriptions ...'
|
|
@@ -1454,7 +1806,7 @@ module Repull
|
|
|
1454
1806
|
post_body = opts[:debug_body]
|
|
1455
1807
|
|
|
1456
1808
|
# return_type
|
|
1457
|
-
return_type = opts[:debug_return_type] || '
|
|
1809
|
+
return_type = opts[:debug_return_type] || 'GetAirbnbCheckinGuide200Response'
|
|
1458
1810
|
|
|
1459
1811
|
# auth_names
|
|
1460
1812
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -1476,8 +1828,78 @@ module Repull
|
|
|
1476
1828
|
return data, status_code, headers
|
|
1477
1829
|
end
|
|
1478
1830
|
|
|
1831
|
+
# List Airbnb permits and licences
|
|
1832
|
+
# The regulatory permits, licences and registration numbers attached to an Airbnb listing. **DB-only by default.** `?source=cache` (the default) returns the permits as last mirrored by the sync worker — regulatory body, regulation type, status, permit number — with no upstream call. **`?source=live` also returns the QUESTIONS.** The mirror stores the RESULT of a permit, not what Airbnb asks for it, so a caller that is about to write needs `?source=live` once: it returns each permit flow with the `question_key`, `answer_type` and `options` of every question, and the answers already on file. Airbnb refuses a `question_key` it did not ask for on this listing, so this is not optional guesswork you can skip. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
|
|
1833
|
+
# @param id [String] Repull listing id (numeric string).
|
|
1834
|
+
# @param [Hash] opts the optional parameters
|
|
1835
|
+
# @option opts [String] :source `cache` (default) reads the local mirror only. `live` additionally asks Airbnb for the permit questions. (default to 'cache')
|
|
1836
|
+
# @return [ListAirbnbListingPermits200Response]
|
|
1837
|
+
def list_airbnb_listing_permits(id, opts = {})
|
|
1838
|
+
data, _status_code, _headers = list_airbnb_listing_permits_with_http_info(id, opts)
|
|
1839
|
+
data
|
|
1840
|
+
end
|
|
1841
|
+
|
|
1842
|
+
# List Airbnb permits and licences
|
|
1843
|
+
# The regulatory permits, licences and registration numbers attached to an Airbnb listing. **DB-only by default.** `?source=cache` (the default) returns the permits as last mirrored by the sync worker — regulatory body, regulation type, status, permit number — with no upstream call. **`?source=live` also returns the QUESTIONS.** The mirror stores the RESULT of a permit, not what Airbnb asks for it, so a caller that is about to write needs `?source=live` once: it returns each permit flow with the `question_key`, `answer_type` and `options` of every question, and the answers already on file. Airbnb refuses a `question_key` it did not ask for on this listing, so this is not optional guesswork you can skip. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
|
|
1844
|
+
# @param id [String] Repull listing id (numeric string).
|
|
1845
|
+
# @param [Hash] opts the optional parameters
|
|
1846
|
+
# @option opts [String] :source `cache` (default) reads the local mirror only. `live` additionally asks Airbnb for the permit questions. (default to 'cache')
|
|
1847
|
+
# @return [Array<(ListAirbnbListingPermits200Response, Integer, Hash)>] ListAirbnbListingPermits200Response data, response status code and response headers
|
|
1848
|
+
def list_airbnb_listing_permits_with_http_info(id, opts = {})
|
|
1849
|
+
if @api_client.config.debugging
|
|
1850
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_permits ...'
|
|
1851
|
+
end
|
|
1852
|
+
# verify the required parameter 'id' is set
|
|
1853
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1854
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_permits"
|
|
1855
|
+
end
|
|
1856
|
+
allowable_values = ["cache", "live"]
|
|
1857
|
+
if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
|
|
1858
|
+
fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
|
|
1859
|
+
end
|
|
1860
|
+
# resource path
|
|
1861
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/permits'.sub('{id}', CGI.escape(id.to_s))
|
|
1862
|
+
|
|
1863
|
+
# query parameters
|
|
1864
|
+
query_params = opts[:query_params] || {}
|
|
1865
|
+
query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
|
|
1866
|
+
|
|
1867
|
+
# header parameters
|
|
1868
|
+
header_params = opts[:header_params] || {}
|
|
1869
|
+
# HTTP header 'Accept' (if needed)
|
|
1870
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1871
|
+
|
|
1872
|
+
# form parameters
|
|
1873
|
+
form_params = opts[:form_params] || {}
|
|
1874
|
+
|
|
1875
|
+
# http body (model)
|
|
1876
|
+
post_body = opts[:debug_body]
|
|
1877
|
+
|
|
1878
|
+
# return_type
|
|
1879
|
+
return_type = opts[:debug_return_type] || 'ListAirbnbListingPermits200Response'
|
|
1880
|
+
|
|
1881
|
+
# auth_names
|
|
1882
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1883
|
+
|
|
1884
|
+
new_options = opts.merge(
|
|
1885
|
+
:operation => :"AirbnbApi.list_airbnb_listing_permits",
|
|
1886
|
+
:header_params => header_params,
|
|
1887
|
+
:query_params => query_params,
|
|
1888
|
+
:form_params => form_params,
|
|
1889
|
+
:body => post_body,
|
|
1890
|
+
:auth_names => auth_names,
|
|
1891
|
+
:return_type => return_type
|
|
1892
|
+
)
|
|
1893
|
+
|
|
1894
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1895
|
+
if @api_client.config.debugging
|
|
1896
|
+
@api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_permits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1897
|
+
end
|
|
1898
|
+
return data, status_code, headers
|
|
1899
|
+
end
|
|
1900
|
+
|
|
1479
1901
|
# List Airbnb photos
|
|
1480
|
-
# List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room).
|
|
1902
|
+
# List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room). Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1481
1903
|
# @param id [String]
|
|
1482
1904
|
# @param [Hash] opts the optional parameters
|
|
1483
1905
|
# @return [nil]
|
|
@@ -1487,7 +1909,7 @@ module Repull
|
|
|
1487
1909
|
end
|
|
1488
1910
|
|
|
1489
1911
|
# List Airbnb photos
|
|
1490
|
-
# List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room).
|
|
1912
|
+
# List photos attached to an Airbnb listing in display order. Returns the public CDN URL plus Airbnb-side metadata (id, caption, room). Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1491
1913
|
# @param id [String]
|
|
1492
1914
|
# @param [Hash] opts the optional parameters
|
|
1493
1915
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -1507,6 +1929,8 @@ module Repull
|
|
|
1507
1929
|
|
|
1508
1930
|
# header parameters
|
|
1509
1931
|
header_params = opts[:header_params] || {}
|
|
1932
|
+
# HTTP header 'Accept' (if needed)
|
|
1933
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1510
1934
|
|
|
1511
1935
|
# form parameters
|
|
1512
1936
|
form_params = opts[:form_params] || {}
|
|
@@ -1538,20 +1962,20 @@ module Repull
|
|
|
1538
1962
|
end
|
|
1539
1963
|
|
|
1540
1964
|
# List Airbnb rooms
|
|
1541
|
-
# List the rooms configured on an Airbnb listing, ordered by room number
|
|
1965
|
+
# List the rooms configured on an Airbnb listing, ordered by room number, each with its sleeping arrangement in `beds`. **Pure DB read** from `listings_airbnb_rooms` + `listings_airbnb_beds`. Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1542
1966
|
# @param id [String] Repull listing id (numeric string).
|
|
1543
1967
|
# @param [Hash] opts the optional parameters
|
|
1544
|
-
# @return [
|
|
1968
|
+
# @return [GetAirbnbCheckinGuide200Response]
|
|
1545
1969
|
def list_airbnb_listing_rooms(id, opts = {})
|
|
1546
1970
|
data, _status_code, _headers = list_airbnb_listing_rooms_with_http_info(id, opts)
|
|
1547
1971
|
data
|
|
1548
1972
|
end
|
|
1549
1973
|
|
|
1550
1974
|
# List Airbnb rooms
|
|
1551
|
-
# List the rooms configured on an Airbnb listing, ordered by room number
|
|
1975
|
+
# List the rooms configured on an Airbnb listing, ordered by room number, each with its sleeping arrangement in `beds`. **Pure DB read** from `listings_airbnb_rooms` + `listings_airbnb_beds`. Returns `404` when the listing has no Airbnb connection in this workspace. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1552
1976
|
# @param id [String] Repull listing id (numeric string).
|
|
1553
1977
|
# @param [Hash] opts the optional parameters
|
|
1554
|
-
# @return [Array<(
|
|
1978
|
+
# @return [Array<(GetAirbnbCheckinGuide200Response, Integer, Hash)>] GetAirbnbCheckinGuide200Response data, response status code and response headers
|
|
1555
1979
|
def list_airbnb_listing_rooms_with_http_info(id, opts = {})
|
|
1556
1980
|
if @api_client.config.debugging
|
|
1557
1981
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_rooms ...'
|
|
@@ -1578,7 +2002,7 @@ module Repull
|
|
|
1578
2002
|
post_body = opts[:debug_body]
|
|
1579
2003
|
|
|
1580
2004
|
# return_type
|
|
1581
|
-
return_type = opts[:debug_return_type] || '
|
|
2005
|
+
return_type = opts[:debug_return_type] || 'GetAirbnbCheckinGuide200Response'
|
|
1582
2006
|
|
|
1583
2007
|
# auth_names
|
|
1584
2008
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -1600,10 +2024,74 @@ module Repull
|
|
|
1600
2024
|
return data, status_code, headers
|
|
1601
2025
|
end
|
|
1602
2026
|
|
|
2027
|
+
# List guest-safety disclosures
|
|
2028
|
+
# What a guest is told about the property before they book — exterior security cameras, a decibel noise monitor, pets on the property, stairs, a pool with no fence, weapons, shared spaces, limited parking. Airbnb calls them `listing_expectations_for_guests` and shows them at booking time. **Pure DB read** from the local mirror. EVERY supported disclosure type is returned, including the ones this listing has not declared (`value: false`), so \"does this property have cameras?\" has an answer rather than a missing key — `declared` tells you whether Airbnb holds an explicit answer. Types Airbnb returns that are not in the documented set are passed through rather than dropped. Where a listing is connected to several Airbnb listings, a disclosure declared on any of them is reported as true of the property. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
|
|
2029
|
+
# @param id [String] Repull listing id (numeric string).
|
|
2030
|
+
# @param [Hash] opts the optional parameters
|
|
2031
|
+
# @return [ListAirbnbListingSafetyDisclosures200Response]
|
|
2032
|
+
def list_airbnb_listing_safety_disclosures(id, opts = {})
|
|
2033
|
+
data, _status_code, _headers = list_airbnb_listing_safety_disclosures_with_http_info(id, opts)
|
|
2034
|
+
data
|
|
2035
|
+
end
|
|
2036
|
+
|
|
2037
|
+
# List guest-safety disclosures
|
|
2038
|
+
# What a guest is told about the property before they book — exterior security cameras, a decibel noise monitor, pets on the property, stairs, a pool with no fence, weapons, shared spaces, limited parking. Airbnb calls them `listing_expectations_for_guests` and shows them at booking time. **Pure DB read** from the local mirror. EVERY supported disclosure type is returned, including the ones this listing has not declared (`value: false`), so \"does this property have cameras?\" has an answer rather than a missing key — `declared` tells you whether Airbnb holds an explicit answer. Types Airbnb returns that are not in the documented set are passed through rather than dropped. Where a listing is connected to several Airbnb listings, a disclosure declared on any of them is reported as true of the property. Returns `404` when the listing has no Airbnb connection in this workspace, and `403 listing_inactive` when the listing is inactive.
|
|
2039
|
+
# @param id [String] Repull listing id (numeric string).
|
|
2040
|
+
# @param [Hash] opts the optional parameters
|
|
2041
|
+
# @return [Array<(ListAirbnbListingSafetyDisclosures200Response, Integer, Hash)>] ListAirbnbListingSafetyDisclosures200Response data, response status code and response headers
|
|
2042
|
+
def list_airbnb_listing_safety_disclosures_with_http_info(id, opts = {})
|
|
2043
|
+
if @api_client.config.debugging
|
|
2044
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.list_airbnb_listing_safety_disclosures ...'
|
|
2045
|
+
end
|
|
2046
|
+
# verify the required parameter 'id' is set
|
|
2047
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2048
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.list_airbnb_listing_safety_disclosures"
|
|
2049
|
+
end
|
|
2050
|
+
# resource path
|
|
2051
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/safety-disclosures'.sub('{id}', CGI.escape(id.to_s))
|
|
2052
|
+
|
|
2053
|
+
# query parameters
|
|
2054
|
+
query_params = opts[:query_params] || {}
|
|
2055
|
+
|
|
2056
|
+
# header parameters
|
|
2057
|
+
header_params = opts[:header_params] || {}
|
|
2058
|
+
# HTTP header 'Accept' (if needed)
|
|
2059
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2060
|
+
|
|
2061
|
+
# form parameters
|
|
2062
|
+
form_params = opts[:form_params] || {}
|
|
2063
|
+
|
|
2064
|
+
# http body (model)
|
|
2065
|
+
post_body = opts[:debug_body]
|
|
2066
|
+
|
|
2067
|
+
# return_type
|
|
2068
|
+
return_type = opts[:debug_return_type] || 'ListAirbnbListingSafetyDisclosures200Response'
|
|
2069
|
+
|
|
2070
|
+
# auth_names
|
|
2071
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2072
|
+
|
|
2073
|
+
new_options = opts.merge(
|
|
2074
|
+
:operation => :"AirbnbApi.list_airbnb_listing_safety_disclosures",
|
|
2075
|
+
:header_params => header_params,
|
|
2076
|
+
:query_params => query_params,
|
|
2077
|
+
:form_params => form_params,
|
|
2078
|
+
:body => post_body,
|
|
2079
|
+
:auth_names => auth_names,
|
|
2080
|
+
:return_type => return_type
|
|
2081
|
+
)
|
|
2082
|
+
|
|
2083
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2084
|
+
if @api_client.config.debugging
|
|
2085
|
+
@api_client.config.logger.debug "API called: AirbnbApi#list_airbnb_listing_safety_disclosures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2086
|
+
end
|
|
2087
|
+
return data, status_code, headers
|
|
2088
|
+
end
|
|
2089
|
+
|
|
1603
2090
|
# List Airbnb listings
|
|
1604
|
-
# List every Airbnb listing this workspace has access to via the connected Airbnb account. **Pure DB read — never calls Airbnb upstream.** The connect flow is what populates the local cache; the API serves what's already there. Customers with a disconnected host still see their last-synced data, with the top-level `
|
|
2091
|
+
# List every Airbnb listing this workspace has access to via the connected Airbnb account. **Pure DB read — never calls Airbnb upstream.** The connect flow is what populates the local cache; the API serves what's already there. Customers with a disconnected host still see their last-synced data, with the top-level `dataFreshness` envelope flagging the staleness and pointing at the reconnect URL. Pass `?include=amenities` to enrich each connection with its locally-cached amenity set. Returns `null` per connection when the cache is empty. Pass `?include=thumbnail` to add `thumbnailUrl` to each listing — one extra column on the query that already runs, so a selection screen renders from a single request instead of one call per listing. `null` when the listing has no thumbnail stored. Combine comma-separated, e.g. `?include=amenities,thumbnail`. **Can this listing be written to?** Every connection carries `syncCategory` — Airbnb's own per-listing API sync decision (`sync_all`, `sync_rates_and_availability`, or `none`) — and `writable`, which is `false` exactly when that category is `none`. Airbnb authorises sync one listing at a time, so a connected account can still hold listings Airbnb refuses every write to; a write to one of those returns `403 listing_not_api_connected` before anything is sent, and reconnecting the account does not change it (the host must switch the listing on in Airbnb). Check `writable` here before a portfolio-wide push instead of discovering it one 403 at a time. Inactive listings are left out; they keep syncing and reappear once activated. Use `GET /v1/listings?status=inactive` to find them. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1605
2092
|
# @param [Hash] opts the optional parameters
|
|
1606
|
-
# @option opts [String] :
|
|
2093
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
2094
|
+
# @option opts [String] :include Comma-separated expansions. Currently supported: `amenities` (adds `amenities` and `accessibility_amenities` arrays to each connection, sourced from the local `listings_airbnb_amenities` cache) and `thumbnail` (adds `thumbnailUrl` to each listing). Unknown values return 422 with a `valid_values` envelope.
|
|
1607
2095
|
# @return [AirbnbListingListResponse]
|
|
1608
2096
|
def list_airbnb_listings(opts = {})
|
|
1609
2097
|
data, _status_code, _headers = list_airbnb_listings_with_http_info(opts)
|
|
@@ -1611,9 +2099,10 @@ module Repull
|
|
|
1611
2099
|
end
|
|
1612
2100
|
|
|
1613
2101
|
# List Airbnb listings
|
|
1614
|
-
# List every Airbnb listing this workspace has access to via the connected Airbnb account. **Pure DB read — never calls Airbnb upstream.** The connect flow is what populates the local cache; the API serves what's already there. Customers with a disconnected host still see their last-synced data, with the top-level `
|
|
2102
|
+
# List every Airbnb listing this workspace has access to via the connected Airbnb account. **Pure DB read — never calls Airbnb upstream.** The connect flow is what populates the local cache; the API serves what's already there. Customers with a disconnected host still see their last-synced data, with the top-level `dataFreshness` envelope flagging the staleness and pointing at the reconnect URL. Pass `?include=amenities` to enrich each connection with its locally-cached amenity set. Returns `null` per connection when the cache is empty. Pass `?include=thumbnail` to add `thumbnailUrl` to each listing — one extra column on the query that already runs, so a selection screen renders from a single request instead of one call per listing. `null` when the listing has no thumbnail stored. Combine comma-separated, e.g. `?include=amenities,thumbnail`. **Can this listing be written to?** Every connection carries `syncCategory` — Airbnb's own per-listing API sync decision (`sync_all`, `sync_rates_and_availability`, or `none`) — and `writable`, which is `false` exactly when that category is `none`. Airbnb authorises sync one listing at a time, so a connected account can still hold listings Airbnb refuses every write to; a write to one of those returns `403 listing_not_api_connected` before anything is sent, and reconnecting the account does not change it (the host must switch the listing on in Airbnb). Check `writable` here before a portfolio-wide push instead of discovering it one 403 at a time. Inactive listings are left out; they keep syncing and reappear once activated. Use `GET /v1/listings?status=inactive` to find them. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1615
2103
|
# @param [Hash] opts the optional parameters
|
|
1616
|
-
# @option opts [String] :
|
|
2104
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
2105
|
+
# @option opts [String] :include Comma-separated expansions. Currently supported: `amenities` (adds `amenities` and `accessibility_amenities` arrays to each connection, sourced from the local `listings_airbnb_amenities` cache) and `thumbnail` (adds `thumbnailUrl` to each listing). Unknown values return 422 with a `valid_values` envelope.
|
|
1617
2106
|
# @return [Array<(AirbnbListingListResponse, Integer, Hash)>] AirbnbListingListResponse data, response status code and response headers
|
|
1618
2107
|
def list_airbnb_listings_with_http_info(opts = {})
|
|
1619
2108
|
if @api_client.config.debugging
|
|
@@ -1624,6 +2113,7 @@ module Repull
|
|
|
1624
2113
|
|
|
1625
2114
|
# query parameters
|
|
1626
2115
|
query_params = opts[:query_params] || {}
|
|
2116
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
1627
2117
|
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
1628
2118
|
|
|
1629
2119
|
# header parameters
|
|
@@ -1661,10 +2151,11 @@ module Repull
|
|
|
1661
2151
|
end
|
|
1662
2152
|
|
|
1663
2153
|
# List Airbnb reservations
|
|
1664
|
-
# Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified `/v1/reservations` endpoint flattens away. Walk pages with `?cursor=<pagination.
|
|
2154
|
+
# Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified `/v1/reservations` endpoint flattens away. Walk pages with `?cursor=<pagination.nextCursor>` until `pagination.hasMore` is `false`. The cursor is opaque — never construct or parse it client-side. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination. When `status` is omitted, all statuses are returned (Airbnb defaults to `accepted` only on its own surface, but this endpoint normalises to \"all\"). Pass `?status=accepted` to scope. Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1665
2155
|
# @param [Hash] opts the optional parameters
|
|
1666
|
-
# @option opts [String] :
|
|
1667
|
-
# @option opts [
|
|
2156
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
2157
|
+
# @option opts [String] :cursor Opaque cursor returned by the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
2158
|
+
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
1668
2159
|
# @option opts [Integer] :limit Max items per page. Hard cap is 100. (default to 50)
|
|
1669
2160
|
# @option opts [String] :listing_id Filter to one Airbnb listing id (numeric string).
|
|
1670
2161
|
# @option opts [String] :status Filter by reservation status. Omit to receive all statuses.
|
|
@@ -1678,10 +2169,11 @@ module Repull
|
|
|
1678
2169
|
end
|
|
1679
2170
|
|
|
1680
2171
|
# List Airbnb reservations
|
|
1681
|
-
# Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified `/v1/reservations` endpoint flattens away. Walk pages with `?cursor=<pagination.
|
|
2172
|
+
# Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified `/v1/reservations` endpoint flattens away. Walk pages with `?cursor=<pagination.nextCursor>` until `pagination.hasMore` is `false`. The cursor is opaque — never construct or parse it client-side. `?offset=` is also accepted as a first-class alias for shallow paging (0..10000) — see the `offset` parameter below. Mutually exclusive with `cursor`. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination. When `status` is omitted, all statuses are returned (Airbnb defaults to `accepted` only on its own surface, but this endpoint normalises to \"all\"). Pass `?status=accepted` to scope. Reservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1682
2173
|
# @param [Hash] opts the optional parameters
|
|
1683
|
-
# @option opts [String] :
|
|
1684
|
-
# @option opts [
|
|
2174
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
2175
|
+
# @option opts [String] :cursor Opaque cursor returned by the previous response's `pagination.nextCursor`. Omit to fetch the first page.
|
|
2176
|
+
# @option opts [Integer] :offset First-class alias for cursor-based pagination. Mutually exclusive with `cursor` — passing both returns 422. Accepts integers in `[0, 10000]`; deeper walks must use `cursor` (constant per-page cost). The response always includes `pagination.nextCursor` so consumers can switch from offset → cursor mid-walk for deep pagination without re-keying. (default to 0)
|
|
1685
2177
|
# @option opts [Integer] :limit Max items per page. Hard cap is 100. (default to 50)
|
|
1686
2178
|
# @option opts [String] :listing_id Filter to one Airbnb listing id (numeric string).
|
|
1687
2179
|
# @option opts [String] :status Filter by reservation status. Omit to receive all statuses.
|
|
@@ -1718,6 +2210,7 @@ module Repull
|
|
|
1718
2210
|
|
|
1719
2211
|
# query parameters
|
|
1720
2212
|
query_params = opts[:query_params] || {}
|
|
2213
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
1721
2214
|
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1722
2215
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
1723
2216
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
@@ -1762,8 +2255,9 @@ module Repull
|
|
|
1762
2255
|
end
|
|
1763
2256
|
|
|
1764
2257
|
# List Airbnb reviews
|
|
1765
|
-
# List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs).
|
|
2258
|
+
# List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs). Reviews of inactive listings are left out; they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1766
2259
|
# @param [Hash] opts the optional parameters
|
|
2260
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
1767
2261
|
# @return [AirbnbReviewListResponse]
|
|
1768
2262
|
def list_airbnb_reviews(opts = {})
|
|
1769
2263
|
data, _status_code, _headers = list_airbnb_reviews_with_http_info(opts)
|
|
@@ -1771,8 +2265,9 @@ module Repull
|
|
|
1771
2265
|
end
|
|
1772
2266
|
|
|
1773
2267
|
# List Airbnb reviews
|
|
1774
|
-
# List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs).
|
|
2268
|
+
# List reviews left by guests on Airbnb listings in this workspace. Includes both reviews of the host and reviews of the guest (where the host has not yet submitted theirs). Reviews of inactive listings are left out; they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1775
2269
|
# @param [Hash] opts the optional parameters
|
|
2270
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
1776
2271
|
# @return [Array<(AirbnbReviewListResponse, Integer, Hash)>] AirbnbReviewListResponse data, response status code and response headers
|
|
1777
2272
|
def list_airbnb_reviews_with_http_info(opts = {})
|
|
1778
2273
|
if @api_client.config.debugging
|
|
@@ -1783,6 +2278,7 @@ module Repull
|
|
|
1783
2278
|
|
|
1784
2279
|
# query parameters
|
|
1785
2280
|
query_params = opts[:query_params] || {}
|
|
2281
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
1786
2282
|
|
|
1787
2283
|
# header parameters
|
|
1788
2284
|
header_params = opts[:header_params] || {}
|
|
@@ -1819,7 +2315,7 @@ module Repull
|
|
|
1819
2315
|
end
|
|
1820
2316
|
|
|
1821
2317
|
# Get Airbnb messages
|
|
1822
|
-
# Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with `?cursor=` until `pagination.hasMore` is `false`.
|
|
2318
|
+
# Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with `?cursor=` until `pagination.hasMore` is `false`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1823
2319
|
# @param thread_id [String]
|
|
1824
2320
|
# @param [Hash] opts the optional parameters
|
|
1825
2321
|
# @return [MessageListResponse]
|
|
@@ -1829,7 +2325,7 @@ module Repull
|
|
|
1829
2325
|
end
|
|
1830
2326
|
|
|
1831
2327
|
# Get Airbnb messages
|
|
1832
|
-
# Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with `?cursor=` until `pagination.hasMore` is `false`.
|
|
2328
|
+
# Fetch the full message log for an Airbnb thread, ordered oldest-to-newest. Walk pages with `?cursor=` until `pagination.hasMore` is `false`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
1833
2329
|
# @param thread_id [String]
|
|
1834
2330
|
# @param [Hash] opts the optional parameters
|
|
1835
2331
|
# @return [Array<(MessageListResponse, Integer, Hash)>] MessageListResponse data, response status code and response headers
|
|
@@ -1882,8 +2378,9 @@ module Repull
|
|
|
1882
2378
|
end
|
|
1883
2379
|
|
|
1884
2380
|
# List Airbnb message threads
|
|
1885
|
-
# List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message.
|
|
2381
|
+
# List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message. Threads on inactive listings are left out; they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1886
2382
|
# @param [Hash] opts the optional parameters
|
|
2383
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
1887
2384
|
# @return [AirbnbThreadListResponse]
|
|
1888
2385
|
def list_airbnb_threads(opts = {})
|
|
1889
2386
|
data, _status_code, _headers = list_airbnb_threads_with_http_info(opts)
|
|
@@ -1891,8 +2388,9 @@ module Repull
|
|
|
1891
2388
|
end
|
|
1892
2389
|
|
|
1893
2390
|
# List Airbnb message threads
|
|
1894
|
-
# List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message.
|
|
2391
|
+
# List Airbnb message threads (one per guest conversation). Cursor-paginated. Each thread includes a preview of the latest message. Threads on inactive listings are left out; they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1895
2392
|
# @param [Hash] opts the optional parameters
|
|
2393
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
1896
2394
|
# @return [Array<(AirbnbThreadListResponse, Integer, Hash)>] AirbnbThreadListResponse data, response status code and response headers
|
|
1897
2395
|
def list_airbnb_threads_with_http_info(opts = {})
|
|
1898
2396
|
if @api_client.config.debugging
|
|
@@ -1903,6 +2401,7 @@ module Repull
|
|
|
1903
2401
|
|
|
1904
2402
|
# query parameters
|
|
1905
2403
|
query_params = opts[:query_params] || {}
|
|
2404
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
1906
2405
|
|
|
1907
2406
|
# header parameters
|
|
1908
2407
|
header_params = opts[:header_params] || {}
|
|
@@ -1939,8 +2438,9 @@ module Repull
|
|
|
1939
2438
|
end
|
|
1940
2439
|
|
|
1941
2440
|
# List Airbnb transactions
|
|
1942
|
-
# List Airbnb host transactions (payouts, adjustments
|
|
2441
|
+
# List Airbnb host transactions (reservation earnings, payouts, resolution adjustments) for this workspace, newest first. **Pure DB read** — customer-facing reads never call Airbnb upstream; they serve the `airbnb_transactions` mirror. Each row carries the genuine host- and guest-side financial breakdown (accommodation subtotal, cleaning fee, host + guest service fees split base/VAT, tax buckets, expected/actual host payout with settlement status). Trigger a refresh with `POST` on this path. When the mirror is empty or the host disconnected, `dataFreshness.stale = true` with a `reason` (`never_synced`, `host_disconnected_<iso>`, `sync_lag_>_24h`). Transactions of reservations on inactive listings are left out; payout rows, which belong to no listing, are always included. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1943
2442
|
# @param [Hash] opts the optional parameters
|
|
2443
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
1944
2444
|
# @return [ListAirbnbTransactions200Response]
|
|
1945
2445
|
def list_airbnb_transactions(opts = {})
|
|
1946
2446
|
data, _status_code, _headers = list_airbnb_transactions_with_http_info(opts)
|
|
@@ -1948,8 +2448,9 @@ module Repull
|
|
|
1948
2448
|
end
|
|
1949
2449
|
|
|
1950
2450
|
# List Airbnb transactions
|
|
1951
|
-
# List Airbnb host transactions (payouts, adjustments
|
|
2451
|
+
# List Airbnb host transactions (reservation earnings, payouts, resolution adjustments) for this workspace, newest first. **Pure DB read** — customer-facing reads never call Airbnb upstream; they serve the `airbnb_transactions` mirror. Each row carries the genuine host- and guest-side financial breakdown (accommodation subtotal, cleaning fee, host + guest service fees split base/VAT, tax buckets, expected/actual host payout with settlement status). Trigger a refresh with `POST` on this path. When the mirror is empty or the host disconnected, `dataFreshness.stale = true` with a `reason` (`never_synced`, `host_disconnected_<iso>`, `sync_lag_>_24h`). Transactions of reservations on inactive listings are left out; payout rows, which belong to no listing, are always included. **Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.
|
|
1952
2452
|
# @param [Hash] opts the optional parameters
|
|
2453
|
+
# @option opts [String] :account_id Scope the response to ONE connected Airbnb account. The value is the Airbnb host id — the same `accounts[].externalAccountId` that `GET /v1/connect/airbnb` returns and `DELETE /v1/connect/airbnb?accountId=` accepts. A workspace can connect several Airbnb accounts. Omit this and you get every account's rows (the default, unchanged). Every row carries `accountId` + `accountName` either way, so you can group without a second call. An id that is not connected to THIS workspace returns `404 not_found` with your own ids in `valid_values` — we do not distinguish \"no such host\" from \"someone else's host\", because confirming the latter would leak another workspace's account. Note this is NOT the `X-Account-Id` header, which carries a connection id and cannot tell two Airbnb hosts apart.
|
|
1953
2454
|
# @return [Array<(ListAirbnbTransactions200Response, Integer, Hash)>] ListAirbnbTransactions200Response data, response status code and response headers
|
|
1954
2455
|
def list_airbnb_transactions_with_http_info(opts = {})
|
|
1955
2456
|
if @api_client.config.debugging
|
|
@@ -1960,6 +2461,7 @@ module Repull
|
|
|
1960
2461
|
|
|
1961
2462
|
# query parameters
|
|
1962
2463
|
query_params = opts[:query_params] || {}
|
|
2464
|
+
query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
|
|
1963
2465
|
|
|
1964
2466
|
# header parameters
|
|
1965
2467
|
header_params = opts[:header_params] || {}
|
|
@@ -1996,7 +2498,7 @@ module Repull
|
|
|
1996
2498
|
end
|
|
1997
2499
|
|
|
1998
2500
|
# Map an Airbnb listing to a Repull listing
|
|
1999
|
-
# Link an existing Airbnb listing to a canonical Repull listing/property. **API-key-scoped** (unlike the Booking room mapping, which is Connect-session-scoped). Discover the `airbnbId` (+ `hostId`) via `GET /v1/channels/airbnb/listings`, then re-point it at the `listingId` of your choice — the dedup / consolidation case where the Airbnb sync auto-created its own listing but you want the inventory under an existing property. Repoints both the Airbnb record and its platform link to the target listing in one transaction. Idempotent — re-mapping to the same listing is a 200 no-op (`alreadyMapped: true`). Scope is enforced against your workspace on both the target listing and the existing Airbnb record; a listing that already links a different Airbnb listing returns 409.
|
|
2501
|
+
# Link an existing Airbnb listing to a canonical Repull listing/property. **API-key-scoped** (unlike the Booking room mapping, which is Connect-session-scoped). Discover the `airbnbId` (+ `hostId`) via `GET /v1/channels/airbnb/listings`, then re-point it at the `listingId` of your choice — the dedup / consolidation case where the Airbnb sync auto-created its own listing but you want the inventory under an existing property. Repoints both the Airbnb record and its platform link to the target listing in one transaction. Idempotent — re-mapping to the same listing is a 200 no-op (`alreadyMapped: true`). Scope is enforced against your workspace on both the target listing and the existing Airbnb record; a listing that already links a different Airbnb listing returns 409. Returns `403 listing_inactive` when the target listing, or the listing the Airbnb listing is mapped to now, is inactive; nothing is changed.
|
|
2000
2502
|
# @param map_airbnb_listing_request [MapAirbnbListingRequest]
|
|
2001
2503
|
# @param [Hash] opts the optional parameters
|
|
2002
2504
|
# @return [MapAirbnbListingResponse]
|
|
@@ -2006,7 +2508,7 @@ module Repull
|
|
|
2006
2508
|
end
|
|
2007
2509
|
|
|
2008
2510
|
# Map an Airbnb listing to a Repull listing
|
|
2009
|
-
# Link an existing Airbnb listing to a canonical Repull listing/property. **API-key-scoped** (unlike the Booking room mapping, which is Connect-session-scoped). Discover the `airbnbId` (+ `hostId`) via `GET /v1/channels/airbnb/listings`, then re-point it at the `listingId` of your choice — the dedup / consolidation case where the Airbnb sync auto-created its own listing but you want the inventory under an existing property. Repoints both the Airbnb record and its platform link to the target listing in one transaction. Idempotent — re-mapping to the same listing is a 200 no-op (`alreadyMapped: true`). Scope is enforced against your workspace on both the target listing and the existing Airbnb record; a listing that already links a different Airbnb listing returns 409.
|
|
2511
|
+
# Link an existing Airbnb listing to a canonical Repull listing/property. **API-key-scoped** (unlike the Booking room mapping, which is Connect-session-scoped). Discover the `airbnbId` (+ `hostId`) via `GET /v1/channels/airbnb/listings`, then re-point it at the `listingId` of your choice — the dedup / consolidation case where the Airbnb sync auto-created its own listing but you want the inventory under an existing property. Repoints both the Airbnb record and its platform link to the target listing in one transaction. Idempotent — re-mapping to the same listing is a 200 no-op (`alreadyMapped: true`). Scope is enforced against your workspace on both the target listing and the existing Airbnb record; a listing that already links a different Airbnb listing returns 409. Returns `403 listing_inactive` when the target listing, or the listing the Airbnb listing is mapped to now, is inactive; nothing is changed.
|
|
2010
2512
|
# @param map_airbnb_listing_request [MapAirbnbListingRequest]
|
|
2011
2513
|
# @param [Hash] opts the optional parameters
|
|
2012
2514
|
# @return [Array<(MapAirbnbListingResponse, Integer, Hash)>] MapAirbnbListingResponse data, response status code and response headers
|
|
@@ -2063,8 +2565,82 @@ module Repull
|
|
|
2063
2565
|
return data, status_code, headers
|
|
2064
2566
|
end
|
|
2065
2567
|
|
|
2568
|
+
# Reorder the Airbnb photo tour
|
|
2569
|
+
# Set the order of a listing's photo tour in one call. **Write-side** — calls Airbnb upstream. Send the photo ids in the order you want them shown, first photo first. Ids you leave out keep their current relative order behind the ones you list, so moving one photo to the front is `{\"photo_ids\": [\"<id>\"]}`. Positions are then written as a dense run starting at 1. Airbnb has no bulk photo endpoint — order is one `sort_order` per photo — so this saves a loop of up to 200 requests against your rate limit and makes the partial-failure case reportable. How much is atomic: - Everything is validated before anything is written. A duplicate id, an id that is not on this listing, an inactive listing or a missing connection all fail with **zero** upstream writes. - Only photos whose position actually changes are written; re-sending the order you already have writes nothing. - On the first upstream failure the run stops — nothing after it is attempted. The error carries `applied`, `failed_photo_id` and `not_attempted`, uses Airbnb's own status (`422` rejected / `403` reauth / `429` / `502`), and the operation is idempotent: re-send the identical body to finish the run. - Our stored copy records what actually landed, never the intent. Validation is against our cached copy of the tour, so a listing whose photos have never synced returns `404` — use `PATCH /photos` (which needs no cache) until the first sync lands. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2570
|
+
# @param id [String] Repull listing id (numeric string).
|
|
2571
|
+
# @param reorder_airbnb_listing_photos_request [ReorderAirbnbListingPhotosRequest]
|
|
2572
|
+
# @param [Hash] opts the optional parameters
|
|
2573
|
+
# @return [ReorderAirbnbListingPhotos200Response]
|
|
2574
|
+
def reorder_airbnb_listing_photos(id, reorder_airbnb_listing_photos_request, opts = {})
|
|
2575
|
+
data, _status_code, _headers = reorder_airbnb_listing_photos_with_http_info(id, reorder_airbnb_listing_photos_request, opts)
|
|
2576
|
+
data
|
|
2577
|
+
end
|
|
2578
|
+
|
|
2579
|
+
# Reorder the Airbnb photo tour
|
|
2580
|
+
# Set the order of a listing's photo tour in one call. **Write-side** — calls Airbnb upstream. Send the photo ids in the order you want them shown, first photo first. Ids you leave out keep their current relative order behind the ones you list, so moving one photo to the front is `{\"photo_ids\": [\"<id>\"]}`. Positions are then written as a dense run starting at 1. Airbnb has no bulk photo endpoint — order is one `sort_order` per photo — so this saves a loop of up to 200 requests against your rate limit and makes the partial-failure case reportable. How much is atomic: - Everything is validated before anything is written. A duplicate id, an id that is not on this listing, an inactive listing or a missing connection all fail with **zero** upstream writes. - Only photos whose position actually changes are written; re-sending the order you already have writes nothing. - On the first upstream failure the run stops — nothing after it is attempted. The error carries `applied`, `failed_photo_id` and `not_attempted`, uses Airbnb's own status (`422` rejected / `403` reauth / `429` / `502`), and the operation is idempotent: re-send the identical body to finish the run. - Our stored copy records what actually landed, never the intent. Validation is against our cached copy of the tour, so a listing whose photos have never synced returns `404` — use `PATCH /photos` (which needs no cache) until the first sync lands. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2581
|
+
# @param id [String] Repull listing id (numeric string).
|
|
2582
|
+
# @param reorder_airbnb_listing_photos_request [ReorderAirbnbListingPhotosRequest]
|
|
2583
|
+
# @param [Hash] opts the optional parameters
|
|
2584
|
+
# @return [Array<(ReorderAirbnbListingPhotos200Response, Integer, Hash)>] ReorderAirbnbListingPhotos200Response data, response status code and response headers
|
|
2585
|
+
def reorder_airbnb_listing_photos_with_http_info(id, reorder_airbnb_listing_photos_request, opts = {})
|
|
2586
|
+
if @api_client.config.debugging
|
|
2587
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.reorder_airbnb_listing_photos ...'
|
|
2588
|
+
end
|
|
2589
|
+
# verify the required parameter 'id' is set
|
|
2590
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2591
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.reorder_airbnb_listing_photos"
|
|
2592
|
+
end
|
|
2593
|
+
# verify the required parameter 'reorder_airbnb_listing_photos_request' is set
|
|
2594
|
+
if @api_client.config.client_side_validation && reorder_airbnb_listing_photos_request.nil?
|
|
2595
|
+
fail ArgumentError, "Missing the required parameter 'reorder_airbnb_listing_photos_request' when calling AirbnbApi.reorder_airbnb_listing_photos"
|
|
2596
|
+
end
|
|
2597
|
+
# resource path
|
|
2598
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/photos/order'.sub('{id}', CGI.escape(id.to_s))
|
|
2599
|
+
|
|
2600
|
+
# query parameters
|
|
2601
|
+
query_params = opts[:query_params] || {}
|
|
2602
|
+
|
|
2603
|
+
# header parameters
|
|
2604
|
+
header_params = opts[:header_params] || {}
|
|
2605
|
+
# HTTP header 'Accept' (if needed)
|
|
2606
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2607
|
+
# HTTP header 'Content-Type'
|
|
2608
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2609
|
+
if !content_type.nil?
|
|
2610
|
+
header_params['Content-Type'] = content_type
|
|
2611
|
+
end
|
|
2612
|
+
|
|
2613
|
+
# form parameters
|
|
2614
|
+
form_params = opts[:form_params] || {}
|
|
2615
|
+
|
|
2616
|
+
# http body (model)
|
|
2617
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(reorder_airbnb_listing_photos_request)
|
|
2618
|
+
|
|
2619
|
+
# return_type
|
|
2620
|
+
return_type = opts[:debug_return_type] || 'ReorderAirbnbListingPhotos200Response'
|
|
2621
|
+
|
|
2622
|
+
# auth_names
|
|
2623
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2624
|
+
|
|
2625
|
+
new_options = opts.merge(
|
|
2626
|
+
:operation => :"AirbnbApi.reorder_airbnb_listing_photos",
|
|
2627
|
+
:header_params => header_params,
|
|
2628
|
+
:query_params => query_params,
|
|
2629
|
+
:form_params => form_params,
|
|
2630
|
+
:body => post_body,
|
|
2631
|
+
:auth_names => auth_names,
|
|
2632
|
+
:return_type => return_type
|
|
2633
|
+
)
|
|
2634
|
+
|
|
2635
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2636
|
+
if @api_client.config.debugging
|
|
2637
|
+
@api_client.config.logger.debug "API called: AirbnbApi#reorder_airbnb_listing_photos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2638
|
+
end
|
|
2639
|
+
return data, status_code, headers
|
|
2640
|
+
end
|
|
2641
|
+
|
|
2066
2642
|
# Respond to Airbnb review
|
|
2067
|
-
# Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters.
|
|
2643
|
+
# Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2068
2644
|
# @param id [String] Airbnb review id.
|
|
2069
2645
|
# @param respond_airbnb_review_request [RespondAirbnbReviewRequest]
|
|
2070
2646
|
# @param [Hash] opts the optional parameters
|
|
@@ -2075,7 +2651,7 @@ module Repull
|
|
|
2075
2651
|
end
|
|
2076
2652
|
|
|
2077
2653
|
# Respond to Airbnb review
|
|
2078
|
-
# Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters.
|
|
2654
|
+
# Post a public host response to a guest review. Airbnb allows one response per review — repeated POSTs return 409. Response text is capped at 1000 characters. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2079
2655
|
# @param id [String] Airbnb review id.
|
|
2080
2656
|
# @param respond_airbnb_review_request [RespondAirbnbReviewRequest]
|
|
2081
2657
|
# @param [Hash] opts the optional parameters
|
|
@@ -2138,7 +2714,7 @@ module Repull
|
|
|
2138
2714
|
end
|
|
2139
2715
|
|
|
2140
2716
|
# Respond to / submit Airbnb review (legacy)
|
|
2141
|
-
# Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `PUT /v1/channels/airbnb/reviews/{id}` (edit) and `POST /v1/channels/airbnb/reviews/{id}/respond` (reply) for new integrations.
|
|
2717
|
+
# Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `PUT /v1/channels/airbnb/reviews/{id}` (edit) and `POST /v1/channels/airbnb/reviews/{id}/respond` (reply) for new integrations. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2142
2718
|
# @param [Hash] opts the optional parameters
|
|
2143
2719
|
# @return [nil]
|
|
2144
2720
|
def respond_airbnb_review_legacy(opts = {})
|
|
@@ -2147,7 +2723,7 @@ module Repull
|
|
|
2147
2723
|
end
|
|
2148
2724
|
|
|
2149
2725
|
# Respond to / submit Airbnb review (legacy)
|
|
2150
|
-
# Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `PUT /v1/channels/airbnb/reviews/{id}` (edit) and `POST /v1/channels/airbnb/reviews/{id}/respond` (reply) for new integrations.
|
|
2726
|
+
# Legacy action-based shape. Body `{ action: \"respond\"|\"submit\", reviewId, response?, review? }`. Kept for backwards compatibility — prefer `PUT /v1/channels/airbnb/reviews/{id}` (edit) and `POST /v1/channels/airbnb/reviews/{id}/respond` (reply) for new integrations. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2151
2727
|
# @param [Hash] opts the optional parameters
|
|
2152
2728
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2153
2729
|
def respond_airbnb_review_legacy_with_http_info(opts = {})
|
|
@@ -2162,6 +2738,8 @@ module Repull
|
|
|
2162
2738
|
|
|
2163
2739
|
# header parameters
|
|
2164
2740
|
header_params = opts[:header_params] || {}
|
|
2741
|
+
# HTTP header 'Accept' (if needed)
|
|
2742
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2165
2743
|
|
|
2166
2744
|
# form parameters
|
|
2167
2745
|
form_params = opts[:form_params] || {}
|
|
@@ -2193,21 +2771,23 @@ module Repull
|
|
|
2193
2771
|
end
|
|
2194
2772
|
|
|
2195
2773
|
# Send Airbnb message
|
|
2196
|
-
# Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as `airbnb_error`.
|
|
2197
|
-
# @param thread_id [String]
|
|
2774
|
+
# Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as `airbnb_error`. The `{threadId}` is the Airbnb thread id — the `externalThreadId` field on a unified `Conversation` (`GET /v1/conversations`). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2775
|
+
# @param thread_id [String] Airbnb thread id (the `externalThreadId` on a unified `Conversation`).
|
|
2776
|
+
# @param send_airbnb_message_request [SendAirbnbMessageRequest]
|
|
2198
2777
|
# @param [Hash] opts the optional parameters
|
|
2199
2778
|
# @return [nil]
|
|
2200
|
-
def send_airbnb_message(thread_id, opts = {})
|
|
2201
|
-
send_airbnb_message_with_http_info(thread_id, opts)
|
|
2779
|
+
def send_airbnb_message(thread_id, send_airbnb_message_request, opts = {})
|
|
2780
|
+
send_airbnb_message_with_http_info(thread_id, send_airbnb_message_request, opts)
|
|
2202
2781
|
nil
|
|
2203
2782
|
end
|
|
2204
2783
|
|
|
2205
2784
|
# Send Airbnb message
|
|
2206
|
-
# Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as `airbnb_error`.
|
|
2207
|
-
# @param thread_id [String]
|
|
2785
|
+
# Send a message in an Airbnb thread as the host. Airbnb enforces content rules (no off-platform contact info, no external URLs) — violating messages are rejected upstream and surface as `airbnb_error`. The `{threadId}` is the Airbnb thread id — the `externalThreadId` field on a unified `Conversation` (`GET /v1/conversations`). Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2786
|
+
# @param thread_id [String] Airbnb thread id (the `externalThreadId` on a unified `Conversation`).
|
|
2787
|
+
# @param send_airbnb_message_request [SendAirbnbMessageRequest]
|
|
2208
2788
|
# @param [Hash] opts the optional parameters
|
|
2209
2789
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2210
|
-
def send_airbnb_message_with_http_info(thread_id, opts = {})
|
|
2790
|
+
def send_airbnb_message_with_http_info(thread_id, send_airbnb_message_request, opts = {})
|
|
2211
2791
|
if @api_client.config.debugging
|
|
2212
2792
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.send_airbnb_message ...'
|
|
2213
2793
|
end
|
|
@@ -2215,6 +2795,10 @@ module Repull
|
|
|
2215
2795
|
if @api_client.config.client_side_validation && thread_id.nil?
|
|
2216
2796
|
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AirbnbApi.send_airbnb_message"
|
|
2217
2797
|
end
|
|
2798
|
+
# verify the required parameter 'send_airbnb_message_request' is set
|
|
2799
|
+
if @api_client.config.client_side_validation && send_airbnb_message_request.nil?
|
|
2800
|
+
fail ArgumentError, "Missing the required parameter 'send_airbnb_message_request' when calling AirbnbApi.send_airbnb_message"
|
|
2801
|
+
end
|
|
2218
2802
|
# resource path
|
|
2219
2803
|
local_var_path = '/v1/channels/airbnb/messaging/{threadId}/messages'.sub('{threadId}', CGI.escape(thread_id.to_s))
|
|
2220
2804
|
|
|
@@ -2223,12 +2807,19 @@ module Repull
|
|
|
2223
2807
|
|
|
2224
2808
|
# header parameters
|
|
2225
2809
|
header_params = opts[:header_params] || {}
|
|
2810
|
+
# HTTP header 'Accept' (if needed)
|
|
2811
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2812
|
+
# HTTP header 'Content-Type'
|
|
2813
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2814
|
+
if !content_type.nil?
|
|
2815
|
+
header_params['Content-Type'] = content_type
|
|
2816
|
+
end
|
|
2226
2817
|
|
|
2227
2818
|
# form parameters
|
|
2228
2819
|
form_params = opts[:form_params] || {}
|
|
2229
2820
|
|
|
2230
2821
|
# http body (model)
|
|
2231
|
-
post_body = opts[:debug_body]
|
|
2822
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(send_airbnb_message_request)
|
|
2232
2823
|
|
|
2233
2824
|
# return_type
|
|
2234
2825
|
return_type = opts[:debug_return_type]
|
|
@@ -2253,37 +2844,249 @@ module Repull
|
|
|
2253
2844
|
return data, status_code, headers
|
|
2254
2845
|
end
|
|
2255
2846
|
|
|
2256
|
-
#
|
|
2257
|
-
#
|
|
2847
|
+
# Set the Airbnb cover photo
|
|
2848
|
+
# Choose which photo leads the listing. **Write-side** — calls Airbnb upstream. Airbnb has no \"cover\" field: the cover is the first photo of the tour, so this is a position write. Usually it is a single upstream request — the chosen photo takes a position below the current first one and nothing else moves. When the tour already starts at position 1 and there is no room below it, the tour is renumbered instead, one request per photo whose position actually changes, with the same stop-at-first-failure reporting as `PUT /photos/order` (`applied`, `failed_photo_id`, `not_attempted`; re-send the identical body to finish). The listing thumbnail — what every list view renders — is repointed at the new cover, so the change is not visible only inside the photo tour. The photo must already be in our cached copy of the tour; one uploaded since the last sync returns `404`, and `PATCH /photos` can set its position in the meantime. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2258
2849
|
# @param id [String] Repull listing id (numeric string).
|
|
2850
|
+
# @param set_airbnb_listing_cover_photo_request [SetAirbnbListingCoverPhotoRequest]
|
|
2259
2851
|
# @param [Hash] opts the optional parameters
|
|
2260
|
-
# @
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
nil
|
|
2852
|
+
# @return [SetAirbnbListingCoverPhoto200Response]
|
|
2853
|
+
def set_airbnb_listing_cover_photo(id, set_airbnb_listing_cover_photo_request, opts = {})
|
|
2854
|
+
data, _status_code, _headers = set_airbnb_listing_cover_photo_with_http_info(id, set_airbnb_listing_cover_photo_request, opts)
|
|
2855
|
+
data
|
|
2265
2856
|
end
|
|
2266
2857
|
|
|
2267
|
-
#
|
|
2268
|
-
#
|
|
2858
|
+
# Set the Airbnb cover photo
|
|
2859
|
+
# Choose which photo leads the listing. **Write-side** — calls Airbnb upstream. Airbnb has no \"cover\" field: the cover is the first photo of the tour, so this is a position write. Usually it is a single upstream request — the chosen photo takes a position below the current first one and nothing else moves. When the tour already starts at position 1 and there is no room below it, the tour is renumbered instead, one request per photo whose position actually changes, with the same stop-at-first-failure reporting as `PUT /photos/order` (`applied`, `failed_photo_id`, `not_attempted`; re-send the identical body to finish). The listing thumbnail — what every list view renders — is repointed at the new cover, so the change is not visible only inside the photo tour. The photo must already be in our cached copy of the tour; one uploaded since the last sync returns `404`, and `PATCH /photos` can set its position in the meantime. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2269
2860
|
# @param id [String] Repull listing id (numeric string).
|
|
2861
|
+
# @param set_airbnb_listing_cover_photo_request [SetAirbnbListingCoverPhotoRequest]
|
|
2270
2862
|
# @param [Hash] opts the optional parameters
|
|
2271
|
-
# @
|
|
2272
|
-
|
|
2273
|
-
def update_airbnb_checkin_guide_with_http_info(id, opts = {})
|
|
2863
|
+
# @return [Array<(SetAirbnbListingCoverPhoto200Response, Integer, Hash)>] SetAirbnbListingCoverPhoto200Response data, response status code and response headers
|
|
2864
|
+
def set_airbnb_listing_cover_photo_with_http_info(id, set_airbnb_listing_cover_photo_request, opts = {})
|
|
2274
2865
|
if @api_client.config.debugging
|
|
2275
|
-
@api_client.config.logger.debug 'Calling API: AirbnbApi.
|
|
2866
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.set_airbnb_listing_cover_photo ...'
|
|
2276
2867
|
end
|
|
2277
2868
|
# verify the required parameter 'id' is set
|
|
2278
2869
|
if @api_client.config.client_side_validation && id.nil?
|
|
2279
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.
|
|
2870
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.set_airbnb_listing_cover_photo"
|
|
2871
|
+
end
|
|
2872
|
+
# verify the required parameter 'set_airbnb_listing_cover_photo_request' is set
|
|
2873
|
+
if @api_client.config.client_side_validation && set_airbnb_listing_cover_photo_request.nil?
|
|
2874
|
+
fail ArgumentError, "Missing the required parameter 'set_airbnb_listing_cover_photo_request' when calling AirbnbApi.set_airbnb_listing_cover_photo"
|
|
2280
2875
|
end
|
|
2281
2876
|
# resource path
|
|
2282
|
-
local_var_path = '/v1/channels/airbnb/listings/{id}/
|
|
2877
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/photos/cover'.sub('{id}', CGI.escape(id.to_s))
|
|
2283
2878
|
|
|
2284
2879
|
# query parameters
|
|
2285
2880
|
query_params = opts[:query_params] || {}
|
|
2286
|
-
|
|
2881
|
+
|
|
2882
|
+
# header parameters
|
|
2883
|
+
header_params = opts[:header_params] || {}
|
|
2884
|
+
# HTTP header 'Accept' (if needed)
|
|
2885
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2886
|
+
# HTTP header 'Content-Type'
|
|
2887
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2888
|
+
if !content_type.nil?
|
|
2889
|
+
header_params['Content-Type'] = content_type
|
|
2890
|
+
end
|
|
2891
|
+
|
|
2892
|
+
# form parameters
|
|
2893
|
+
form_params = opts[:form_params] || {}
|
|
2894
|
+
|
|
2895
|
+
# http body (model)
|
|
2896
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_airbnb_listing_cover_photo_request)
|
|
2897
|
+
|
|
2898
|
+
# return_type
|
|
2899
|
+
return_type = opts[:debug_return_type] || 'SetAirbnbListingCoverPhoto200Response'
|
|
2900
|
+
|
|
2901
|
+
# auth_names
|
|
2902
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2903
|
+
|
|
2904
|
+
new_options = opts.merge(
|
|
2905
|
+
:operation => :"AirbnbApi.set_airbnb_listing_cover_photo",
|
|
2906
|
+
:header_params => header_params,
|
|
2907
|
+
:query_params => query_params,
|
|
2908
|
+
:form_params => form_params,
|
|
2909
|
+
:body => post_body,
|
|
2910
|
+
:auth_names => auth_names,
|
|
2911
|
+
:return_type => return_type
|
|
2912
|
+
)
|
|
2913
|
+
|
|
2914
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2915
|
+
if @api_client.config.debugging
|
|
2916
|
+
@api_client.config.logger.debug "API called: AirbnbApi#set_airbnb_listing_cover_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2917
|
+
end
|
|
2918
|
+
return data, status_code, headers
|
|
2919
|
+
end
|
|
2920
|
+
|
|
2921
|
+
# Sync Airbnb transactions
|
|
2922
|
+
# Refresh the Airbnb transactions mirror for this workspace by pulling from Airbnb upstream and upserting the breakdown that `GET` serves. Optional JSON body `{ start_date, end_date, transaction_type }` (`transaction_type` is `COMPLETED` or `UPCOMING`; both are synced when omitted). Returns `{ synced, count }`.
|
|
2923
|
+
# @param [Hash] opts the optional parameters
|
|
2924
|
+
# @option opts [SyncAirbnbTransactionsRequest] :sync_airbnb_transactions_request
|
|
2925
|
+
# @return [SyncAirbnbTransactions200Response]
|
|
2926
|
+
def sync_airbnb_transactions(opts = {})
|
|
2927
|
+
data, _status_code, _headers = sync_airbnb_transactions_with_http_info(opts)
|
|
2928
|
+
data
|
|
2929
|
+
end
|
|
2930
|
+
|
|
2931
|
+
# Sync Airbnb transactions
|
|
2932
|
+
# Refresh the Airbnb transactions mirror for this workspace by pulling from Airbnb upstream and upserting the breakdown that `GET` serves. Optional JSON body `{ start_date, end_date, transaction_type }` (`transaction_type` is `COMPLETED` or `UPCOMING`; both are synced when omitted). Returns `{ synced, count }`.
|
|
2933
|
+
# @param [Hash] opts the optional parameters
|
|
2934
|
+
# @option opts [SyncAirbnbTransactionsRequest] :sync_airbnb_transactions_request
|
|
2935
|
+
# @return [Array<(SyncAirbnbTransactions200Response, Integer, Hash)>] SyncAirbnbTransactions200Response data, response status code and response headers
|
|
2936
|
+
def sync_airbnb_transactions_with_http_info(opts = {})
|
|
2937
|
+
if @api_client.config.debugging
|
|
2938
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.sync_airbnb_transactions ...'
|
|
2939
|
+
end
|
|
2940
|
+
# resource path
|
|
2941
|
+
local_var_path = '/v1/channels/airbnb/transactions'
|
|
2942
|
+
|
|
2943
|
+
# query parameters
|
|
2944
|
+
query_params = opts[:query_params] || {}
|
|
2945
|
+
|
|
2946
|
+
# header parameters
|
|
2947
|
+
header_params = opts[:header_params] || {}
|
|
2948
|
+
# HTTP header 'Accept' (if needed)
|
|
2949
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2950
|
+
# HTTP header 'Content-Type'
|
|
2951
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2952
|
+
if !content_type.nil?
|
|
2953
|
+
header_params['Content-Type'] = content_type
|
|
2954
|
+
end
|
|
2955
|
+
|
|
2956
|
+
# form parameters
|
|
2957
|
+
form_params = opts[:form_params] || {}
|
|
2958
|
+
|
|
2959
|
+
# http body (model)
|
|
2960
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'sync_airbnb_transactions_request'])
|
|
2961
|
+
|
|
2962
|
+
# return_type
|
|
2963
|
+
return_type = opts[:debug_return_type] || 'SyncAirbnbTransactions200Response'
|
|
2964
|
+
|
|
2965
|
+
# auth_names
|
|
2966
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2967
|
+
|
|
2968
|
+
new_options = opts.merge(
|
|
2969
|
+
:operation => :"AirbnbApi.sync_airbnb_transactions",
|
|
2970
|
+
:header_params => header_params,
|
|
2971
|
+
:query_params => query_params,
|
|
2972
|
+
:form_params => form_params,
|
|
2973
|
+
:body => post_body,
|
|
2974
|
+
:auth_names => auth_names,
|
|
2975
|
+
:return_type => return_type
|
|
2976
|
+
)
|
|
2977
|
+
|
|
2978
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2979
|
+
if @api_client.config.debugging
|
|
2980
|
+
@api_client.config.logger.debug "API called: AirbnbApi#sync_airbnb_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2981
|
+
end
|
|
2982
|
+
return data, status_code, headers
|
|
2983
|
+
end
|
|
2984
|
+
|
|
2985
|
+
# Update Airbnb booking settings
|
|
2986
|
+
# Set any subset of a listing's booking settings on Airbnb. Partial — a field you do not send is left as it is. `{id}` is the **Repull listing id** (from `GET /v1/properties` or `GET /v1/channels/airbnb/listings`), not the Airbnb listing id; Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb, so a bad value is a `422` naming the field rather than a failed upstream call. Unknown fields are refused rather than dropped. **Two groups, applied in order.** Instant Book, check-in/out and the cancellation fields go to Airbnb's booking-settings resource. Advance notice, preparation time and booking window go to Airbnb's availability rules — Airbnb replaces that whole document, so Repull reads the current rules first and merges your change onto them, which is why setting a preparation time does not blank the listing's min/max nights. The response's `applied` array names the groups that were written. **Non-refundable is a percentage here, a factor on Airbnb.** Airbnb stores `non_refundable_price_factor` between 0.7 and 1.0; send `cancellation.nonRefundable.discountPercent` (0-30) and Repull converts — 10% becomes 0.9. `enabled: false` sets the factor to 1.0. **Not exposed by Airbnb:** `preReservationMessage` and `automaticStayExtension`. Sending either returns a `422` explaining where to set it instead. **Errors:** `403 connection_reauth_required` — Airbnb no longer accepts the connection for this listing (reconnect; retrying won't help). `403 listing_inactive` — the listing is inactive. `404 not_found` — no Airbnb-connected listing with this id in the workspace. `422 invalid_params` — the body is wrong; `field` names it. `422 airbnb_rejected` — Airbnb refused the change; `message` carries its reason. `429 airbnb_rate_limited` — back off. `502 airbnb_error` — Airbnb outage or timeout; retry.
|
|
2987
|
+
# @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
|
|
2988
|
+
# @param update_airbnb_booking_settings_request [UpdateAirbnbBookingSettingsRequest]
|
|
2989
|
+
# @param [Hash] opts the optional parameters
|
|
2990
|
+
# @return [UpdateAirbnbBookingSettings200Response]
|
|
2991
|
+
def update_airbnb_booking_settings(id, update_airbnb_booking_settings_request, opts = {})
|
|
2992
|
+
data, _status_code, _headers = update_airbnb_booking_settings_with_http_info(id, update_airbnb_booking_settings_request, opts)
|
|
2993
|
+
data
|
|
2994
|
+
end
|
|
2995
|
+
|
|
2996
|
+
# Update Airbnb booking settings
|
|
2997
|
+
# Set any subset of a listing's booking settings on Airbnb. Partial — a field you do not send is left as it is. `{id}` is the **Repull listing id** (from `GET /v1/properties` or `GET /v1/channels/airbnb/listings`), not the Airbnb listing id; Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb, so a bad value is a `422` naming the field rather than a failed upstream call. Unknown fields are refused rather than dropped. **Two groups, applied in order.** Instant Book, check-in/out and the cancellation fields go to Airbnb's booking-settings resource. Advance notice, preparation time and booking window go to Airbnb's availability rules — Airbnb replaces that whole document, so Repull reads the current rules first and merges your change onto them, which is why setting a preparation time does not blank the listing's min/max nights. The response's `applied` array names the groups that were written. **Non-refundable is a percentage here, a factor on Airbnb.** Airbnb stores `non_refundable_price_factor` between 0.7 and 1.0; send `cancellation.nonRefundable.discountPercent` (0-30) and Repull converts — 10% becomes 0.9. `enabled: false` sets the factor to 1.0. **Not exposed by Airbnb:** `preReservationMessage` and `automaticStayExtension`. Sending either returns a `422` explaining where to set it instead. **Errors:** `403 connection_reauth_required` — Airbnb no longer accepts the connection for this listing (reconnect; retrying won't help). `403 listing_inactive` — the listing is inactive. `404 not_found` — no Airbnb-connected listing with this id in the workspace. `422 invalid_params` — the body is wrong; `field` names it. `422 airbnb_rejected` — Airbnb refused the change; `message` carries its reason. `429 airbnb_rate_limited` — back off. `502 airbnb_error` — Airbnb outage or timeout; retry.
|
|
2998
|
+
# @param id [String] Repull listing id (numeric string), not the Airbnb listing id.
|
|
2999
|
+
# @param update_airbnb_booking_settings_request [UpdateAirbnbBookingSettingsRequest]
|
|
3000
|
+
# @param [Hash] opts the optional parameters
|
|
3001
|
+
# @return [Array<(UpdateAirbnbBookingSettings200Response, Integer, Hash)>] UpdateAirbnbBookingSettings200Response data, response status code and response headers
|
|
3002
|
+
def update_airbnb_booking_settings_with_http_info(id, update_airbnb_booking_settings_request, opts = {})
|
|
3003
|
+
if @api_client.config.debugging
|
|
3004
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_booking_settings ...'
|
|
3005
|
+
end
|
|
3006
|
+
# verify the required parameter 'id' is set
|
|
3007
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3008
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_booking_settings"
|
|
3009
|
+
end
|
|
3010
|
+
# verify the required parameter 'update_airbnb_booking_settings_request' is set
|
|
3011
|
+
if @api_client.config.client_side_validation && update_airbnb_booking_settings_request.nil?
|
|
3012
|
+
fail ArgumentError, "Missing the required parameter 'update_airbnb_booking_settings_request' when calling AirbnbApi.update_airbnb_booking_settings"
|
|
3013
|
+
end
|
|
3014
|
+
# resource path
|
|
3015
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/booking-settings'.sub('{id}', CGI.escape(id.to_s))
|
|
3016
|
+
|
|
3017
|
+
# query parameters
|
|
3018
|
+
query_params = opts[:query_params] || {}
|
|
3019
|
+
|
|
3020
|
+
# header parameters
|
|
3021
|
+
header_params = opts[:header_params] || {}
|
|
3022
|
+
# HTTP header 'Accept' (if needed)
|
|
3023
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3024
|
+
# HTTP header 'Content-Type'
|
|
3025
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3026
|
+
if !content_type.nil?
|
|
3027
|
+
header_params['Content-Type'] = content_type
|
|
3028
|
+
end
|
|
3029
|
+
|
|
3030
|
+
# form parameters
|
|
3031
|
+
form_params = opts[:form_params] || {}
|
|
3032
|
+
|
|
3033
|
+
# http body (model)
|
|
3034
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_booking_settings_request)
|
|
3035
|
+
|
|
3036
|
+
# return_type
|
|
3037
|
+
return_type = opts[:debug_return_type] || 'UpdateAirbnbBookingSettings200Response'
|
|
3038
|
+
|
|
3039
|
+
# auth_names
|
|
3040
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3041
|
+
|
|
3042
|
+
new_options = opts.merge(
|
|
3043
|
+
:operation => :"AirbnbApi.update_airbnb_booking_settings",
|
|
3044
|
+
:header_params => header_params,
|
|
3045
|
+
:query_params => query_params,
|
|
3046
|
+
:form_params => form_params,
|
|
3047
|
+
:body => post_body,
|
|
3048
|
+
:auth_names => auth_names,
|
|
3049
|
+
:return_type => return_type
|
|
3050
|
+
)
|
|
3051
|
+
|
|
3052
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3053
|
+
if @api_client.config.debugging
|
|
3054
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_booking_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3055
|
+
end
|
|
3056
|
+
return data, status_code, headers
|
|
3057
|
+
end
|
|
3058
|
+
|
|
3059
|
+
# Upsert Airbnb check-in guide
|
|
3060
|
+
# Upsert the check-in guide for one locale on an Airbnb listing. **Write-side** — calls Airbnb upstream; the DB mirror is reconciled by the sync worker once the upstream call returns. Target the locale with `?locale=en` (defaults to `en`). Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3061
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3062
|
+
# @param [Hash] opts the optional parameters
|
|
3063
|
+
# @option opts [String] :locale Locale to upsert. Defaults to `en`. (default to 'en')
|
|
3064
|
+
# @return [nil]
|
|
3065
|
+
def update_airbnb_checkin_guide(id, opts = {})
|
|
3066
|
+
update_airbnb_checkin_guide_with_http_info(id, opts)
|
|
3067
|
+
nil
|
|
3068
|
+
end
|
|
3069
|
+
|
|
3070
|
+
# Upsert Airbnb check-in guide
|
|
3071
|
+
# Upsert the check-in guide for one locale on an Airbnb listing. **Write-side** — calls Airbnb upstream; the DB mirror is reconciled by the sync worker once the upstream call returns. Target the locale with `?locale=en` (defaults to `en`). Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3072
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3073
|
+
# @param [Hash] opts the optional parameters
|
|
3074
|
+
# @option opts [String] :locale Locale to upsert. Defaults to `en`. (default to 'en')
|
|
3075
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
3076
|
+
def update_airbnb_checkin_guide_with_http_info(id, opts = {})
|
|
3077
|
+
if @api_client.config.debugging
|
|
3078
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_checkin_guide ...'
|
|
3079
|
+
end
|
|
3080
|
+
# verify the required parameter 'id' is set
|
|
3081
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3082
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_checkin_guide"
|
|
3083
|
+
end
|
|
3084
|
+
# resource path
|
|
3085
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/checkin-guide'.sub('{id}', CGI.escape(id.to_s))
|
|
3086
|
+
|
|
3087
|
+
# query parameters
|
|
3088
|
+
query_params = opts[:query_params] || {}
|
|
3089
|
+
query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
|
|
2287
3090
|
|
|
2288
3091
|
# header parameters
|
|
2289
3092
|
header_params = opts[:header_params] || {}
|
|
@@ -2297,13 +3100,323 @@ module Repull
|
|
|
2297
3100
|
post_body = opts[:debug_body]
|
|
2298
3101
|
|
|
2299
3102
|
# return_type
|
|
2300
|
-
return_type = opts[:debug_return_type]
|
|
3103
|
+
return_type = opts[:debug_return_type]
|
|
3104
|
+
|
|
3105
|
+
# auth_names
|
|
3106
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3107
|
+
|
|
3108
|
+
new_options = opts.merge(
|
|
3109
|
+
:operation => :"AirbnbApi.update_airbnb_checkin_guide",
|
|
3110
|
+
:header_params => header_params,
|
|
3111
|
+
:query_params => query_params,
|
|
3112
|
+
:form_params => form_params,
|
|
3113
|
+
:body => post_body,
|
|
3114
|
+
:auth_names => auth_names,
|
|
3115
|
+
:return_type => return_type
|
|
3116
|
+
)
|
|
3117
|
+
|
|
3118
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3119
|
+
if @api_client.config.debugging
|
|
3120
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_checkin_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3121
|
+
end
|
|
3122
|
+
return data, status_code, headers
|
|
3123
|
+
end
|
|
3124
|
+
|
|
3125
|
+
# Update Airbnb amenities
|
|
3126
|
+
# Set amenities on an Airbnb listing. **Write-side** — calls Airbnb upstream. **Partial by design**: only the amenities you name change, so turning one off is a one-line body and nothing else on the listing moves. Ids are the `id` values `GET /amenities` returns (e.g. `wireless_internet`, `ac`, `kitchen`); case is ignored. Airbnb refuses ids outside its vocabulary — that comes back as `422 airbnb_rejected` carrying Airbnb's own message. `accessibility_amenities` go to Airbnb's separate accessibility resource, which has **no read side at all** — Airbnb offers no endpoint to fetch them back, and the combined amenities GET 404s on production listings. What you can read back is our own copy: this endpoint updates it on success, and `GET /amenities` returns it under `accessibilityAmenities`. Airbnb may also hold an accessibility claim for review until photo evidence is attached; pass `photo_ids` to supply it. Our Airbnb copy is updated on success so a read straight after this write returns the new values. The platform-neutral copy behind `GET /v1/listings/{id}?include=amenities` uses a different amenity vocabulary and is refreshed by the next sync, except where an id happens to be identical in both. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3127
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3128
|
+
# @param update_airbnb_listing_amenities_request [UpdateAirbnbListingAmenitiesRequest]
|
|
3129
|
+
# @param [Hash] opts the optional parameters
|
|
3130
|
+
# @return [UpdateAirbnbListingAmenities200Response]
|
|
3131
|
+
def update_airbnb_listing_amenities(id, update_airbnb_listing_amenities_request, opts = {})
|
|
3132
|
+
data, _status_code, _headers = update_airbnb_listing_amenities_with_http_info(id, update_airbnb_listing_amenities_request, opts)
|
|
3133
|
+
data
|
|
3134
|
+
end
|
|
3135
|
+
|
|
3136
|
+
# Update Airbnb amenities
|
|
3137
|
+
# Set amenities on an Airbnb listing. **Write-side** — calls Airbnb upstream. **Partial by design**: only the amenities you name change, so turning one off is a one-line body and nothing else on the listing moves. Ids are the `id` values `GET /amenities` returns (e.g. `wireless_internet`, `ac`, `kitchen`); case is ignored. Airbnb refuses ids outside its vocabulary — that comes back as `422 airbnb_rejected` carrying Airbnb's own message. `accessibility_amenities` go to Airbnb's separate accessibility resource, which has **no read side at all** — Airbnb offers no endpoint to fetch them back, and the combined amenities GET 404s on production listings. What you can read back is our own copy: this endpoint updates it on success, and `GET /amenities` returns it under `accessibilityAmenities`. Airbnb may also hold an accessibility claim for review until photo evidence is attached; pass `photo_ids` to supply it. Our Airbnb copy is updated on success so a read straight after this write returns the new values. The platform-neutral copy behind `GET /v1/listings/{id}?include=amenities` uses a different amenity vocabulary and is refreshed by the next sync, except where an id happens to be identical in both. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3138
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3139
|
+
# @param update_airbnb_listing_amenities_request [UpdateAirbnbListingAmenitiesRequest]
|
|
3140
|
+
# @param [Hash] opts the optional parameters
|
|
3141
|
+
# @return [Array<(UpdateAirbnbListingAmenities200Response, Integer, Hash)>] UpdateAirbnbListingAmenities200Response data, response status code and response headers
|
|
3142
|
+
def update_airbnb_listing_amenities_with_http_info(id, update_airbnb_listing_amenities_request, opts = {})
|
|
3143
|
+
if @api_client.config.debugging
|
|
3144
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_amenities ...'
|
|
3145
|
+
end
|
|
3146
|
+
# verify the required parameter 'id' is set
|
|
3147
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3148
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_amenities"
|
|
3149
|
+
end
|
|
3150
|
+
# verify the required parameter 'update_airbnb_listing_amenities_request' is set
|
|
3151
|
+
if @api_client.config.client_side_validation && update_airbnb_listing_amenities_request.nil?
|
|
3152
|
+
fail ArgumentError, "Missing the required parameter 'update_airbnb_listing_amenities_request' when calling AirbnbApi.update_airbnb_listing_amenities"
|
|
3153
|
+
end
|
|
3154
|
+
# resource path
|
|
3155
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/amenities'.sub('{id}', CGI.escape(id.to_s))
|
|
3156
|
+
|
|
3157
|
+
# query parameters
|
|
3158
|
+
query_params = opts[:query_params] || {}
|
|
3159
|
+
|
|
3160
|
+
# header parameters
|
|
3161
|
+
header_params = opts[:header_params] || {}
|
|
3162
|
+
# HTTP header 'Accept' (if needed)
|
|
3163
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3164
|
+
# HTTP header 'Content-Type'
|
|
3165
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3166
|
+
if !content_type.nil?
|
|
3167
|
+
header_params['Content-Type'] = content_type
|
|
3168
|
+
end
|
|
3169
|
+
|
|
3170
|
+
# form parameters
|
|
3171
|
+
form_params = opts[:form_params] || {}
|
|
3172
|
+
|
|
3173
|
+
# http body (model)
|
|
3174
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_listing_amenities_request)
|
|
3175
|
+
|
|
3176
|
+
# return_type
|
|
3177
|
+
return_type = opts[:debug_return_type] || 'UpdateAirbnbListingAmenities200Response'
|
|
3178
|
+
|
|
3179
|
+
# auth_names
|
|
3180
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3181
|
+
|
|
3182
|
+
new_options = opts.merge(
|
|
3183
|
+
:operation => :"AirbnbApi.update_airbnb_listing_amenities",
|
|
3184
|
+
:header_params => header_params,
|
|
3185
|
+
:query_params => query_params,
|
|
3186
|
+
:form_params => form_params,
|
|
3187
|
+
:body => post_body,
|
|
3188
|
+
:auth_names => auth_names,
|
|
3189
|
+
:return_type => return_type
|
|
3190
|
+
)
|
|
3191
|
+
|
|
3192
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3193
|
+
if @api_client.config.debugging
|
|
3194
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_amenities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3195
|
+
end
|
|
3196
|
+
return data, status_code, headers
|
|
3197
|
+
end
|
|
3198
|
+
|
|
3199
|
+
# Update Airbnb availability
|
|
3200
|
+
# Push availability + restrictions to Airbnb. `type: \"calendar\"` writes per-date restrictions — min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`) — via a batch of operations that each target either a date range or an explicit date list. `type: \"rules\"` writes listing-level availability rules (default min/max nights, booking lead time, turnover days, seasonal/day-of-week min nights). Restrictions never leak across channels — this endpoint writes only to Airbnb. `{id}` is the **Repull listing id** (from `GET /v1/properties` or `GET /v1/channels/airbnb/listings`), not the Airbnb listing id — Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb: a malformed body is `422 invalid_params` naming the `field`. Calendar operations accept only the documented fields. **Blocking dates:** Airbnb requires a `busy_subtype` whenever `availability` is `\"unavailable\"`. If an operation leaves it out, Repull sends `busy_subtype: \"BLOCKED_BY_HOST\"`; send `\"OUTSIDE_RESERVATION\"` for dates held by a booking made on another channel. **Errors:** `403 listing_not_api_connected` — Airbnb was never told to sync this listing (its `syncCategory` is `none`); the host must switch API sync on for it in Airbnb, reconnecting the account will not help. `403 connection_reauth_required` — Airbnb no longer accepts the connection at all (reconnect; retrying won't help). `403 listing_inactive` — the listing is inactive. `404 not_found` — no Airbnb-connected listing with this id in the workspace. `422 airbnb_rejected` — Airbnb refused the change; `message` carries its reason. `429 airbnb_rate_limited` — back off. `502 airbnb_error` — Airbnb outage or timeout; retry.
|
|
3201
|
+
# @param id [String]
|
|
3202
|
+
# @param airbnb_availability_write_request [AirbnbAvailabilityWriteRequest]
|
|
3203
|
+
# @param [Hash] opts the optional parameters
|
|
3204
|
+
# @return [nil]
|
|
3205
|
+
def update_airbnb_listing_availability(id, airbnb_availability_write_request, opts = {})
|
|
3206
|
+
update_airbnb_listing_availability_with_http_info(id, airbnb_availability_write_request, opts)
|
|
3207
|
+
nil
|
|
3208
|
+
end
|
|
3209
|
+
|
|
3210
|
+
# Update Airbnb availability
|
|
3211
|
+
# Push availability + restrictions to Airbnb. `type: \"calendar\"` writes per-date restrictions — min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`) — via a batch of operations that each target either a date range or an explicit date list. `type: \"rules\"` writes listing-level availability rules (default min/max nights, booking lead time, turnover days, seasonal/day-of-week min nights). Restrictions never leak across channels — this endpoint writes only to Airbnb. `{id}` is the **Repull listing id** (from `GET /v1/properties` or `GET /v1/channels/airbnb/listings`), not the Airbnb listing id — Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb: a malformed body is `422 invalid_params` naming the `field`. Calendar operations accept only the documented fields. **Blocking dates:** Airbnb requires a `busy_subtype` whenever `availability` is `\"unavailable\"`. If an operation leaves it out, Repull sends `busy_subtype: \"BLOCKED_BY_HOST\"`; send `\"OUTSIDE_RESERVATION\"` for dates held by a booking made on another channel. **Errors:** `403 listing_not_api_connected` — Airbnb was never told to sync this listing (its `syncCategory` is `none`); the host must switch API sync on for it in Airbnb, reconnecting the account will not help. `403 connection_reauth_required` — Airbnb no longer accepts the connection at all (reconnect; retrying won't help). `403 listing_inactive` — the listing is inactive. `404 not_found` — no Airbnb-connected listing with this id in the workspace. `422 airbnb_rejected` — Airbnb refused the change; `message` carries its reason. `429 airbnb_rate_limited` — back off. `502 airbnb_error` — Airbnb outage or timeout; retry.
|
|
3212
|
+
# @param id [String]
|
|
3213
|
+
# @param airbnb_availability_write_request [AirbnbAvailabilityWriteRequest]
|
|
3214
|
+
# @param [Hash] opts the optional parameters
|
|
3215
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
3216
|
+
def update_airbnb_listing_availability_with_http_info(id, airbnb_availability_write_request, opts = {})
|
|
3217
|
+
if @api_client.config.debugging
|
|
3218
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_availability ...'
|
|
3219
|
+
end
|
|
3220
|
+
# verify the required parameter 'id' is set
|
|
3221
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3222
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_availability"
|
|
3223
|
+
end
|
|
3224
|
+
# verify the required parameter 'airbnb_availability_write_request' is set
|
|
3225
|
+
if @api_client.config.client_side_validation && airbnb_availability_write_request.nil?
|
|
3226
|
+
fail ArgumentError, "Missing the required parameter 'airbnb_availability_write_request' when calling AirbnbApi.update_airbnb_listing_availability"
|
|
3227
|
+
end
|
|
3228
|
+
# resource path
|
|
3229
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/availability'.sub('{id}', CGI.escape(id.to_s))
|
|
3230
|
+
|
|
3231
|
+
# query parameters
|
|
3232
|
+
query_params = opts[:query_params] || {}
|
|
3233
|
+
|
|
3234
|
+
# header parameters
|
|
3235
|
+
header_params = opts[:header_params] || {}
|
|
3236
|
+
# HTTP header 'Accept' (if needed)
|
|
3237
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3238
|
+
# HTTP header 'Content-Type'
|
|
3239
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3240
|
+
if !content_type.nil?
|
|
3241
|
+
header_params['Content-Type'] = content_type
|
|
3242
|
+
end
|
|
3243
|
+
|
|
3244
|
+
# form parameters
|
|
3245
|
+
form_params = opts[:form_params] || {}
|
|
3246
|
+
|
|
3247
|
+
# http body (model)
|
|
3248
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_availability_write_request)
|
|
3249
|
+
|
|
3250
|
+
# return_type
|
|
3251
|
+
return_type = opts[:debug_return_type]
|
|
3252
|
+
|
|
3253
|
+
# auth_names
|
|
3254
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3255
|
+
|
|
3256
|
+
new_options = opts.merge(
|
|
3257
|
+
:operation => :"AirbnbApi.update_airbnb_listing_availability",
|
|
3258
|
+
:header_params => header_params,
|
|
3259
|
+
:query_params => query_params,
|
|
3260
|
+
:form_params => form_params,
|
|
3261
|
+
:body => post_body,
|
|
3262
|
+
:auth_names => auth_names,
|
|
3263
|
+
:return_type => return_type
|
|
3264
|
+
)
|
|
3265
|
+
|
|
3266
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3267
|
+
if @api_client.config.debugging
|
|
3268
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_availability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3269
|
+
end
|
|
3270
|
+
return data, status_code, headers
|
|
3271
|
+
end
|
|
3272
|
+
|
|
3273
|
+
# Update an Airbnb description for one locale
|
|
3274
|
+
# Write one locale's copy to the live Airbnb listing. Airbnb keeps a SEPARATE description per locale (`PUT /v2/listing_descriptions/{listingId}/{locale}`), which is why `locale` is part of the request and not a guess: a listing can carry twelve of them, and writing Italian copy into the English row is how a translation gets lost. Only the fields you send are written; Airbnb keeps the rest. `GET /v1/channels/airbnb/listings/{id}/settings?type=locales` lists the locales already synced for the listing. `description` is not an accepted field: Airbnb composes the public description from the sections (`summary`, `space`, `access`, …) and ignores a directly-supplied one. **A 200 does not by itself mean the change was applied.** On an established listing Airbnb LOCKS host-managed description fields — the write returns 200, reports them as locked, and applies nothing for them. The response reports `blockedFields`: the fields YOU sent that Airbnb dropped. `blockedFields: []` is what a landed write looks like; a non-empty list is still a 200 (the other fields really were written) with a `message` naming what was not. Reporting that as a clean success is the bug behind \"the description does not push to Airbnb\". This writes to AIRBNB. To write Repull's own canonical copy — the content a later publish distributes — use `PUT /v1/listings/{id}/content` with `locale`. Send `Idempotency-Key` to make a retry safe. Returns `403 listing_inactive` when the listing is inactive.
|
|
3275
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3276
|
+
# @param airbnb_description_write_request [AirbnbDescriptionWriteRequest]
|
|
3277
|
+
# @param [Hash] opts the optional parameters
|
|
3278
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
3279
|
+
# @return [AirbnbContentWriteResponse]
|
|
3280
|
+
def update_airbnb_listing_description(id, airbnb_description_write_request, opts = {})
|
|
3281
|
+
data, _status_code, _headers = update_airbnb_listing_description_with_http_info(id, airbnb_description_write_request, opts)
|
|
3282
|
+
data
|
|
3283
|
+
end
|
|
3284
|
+
|
|
3285
|
+
# Update an Airbnb description for one locale
|
|
3286
|
+
# Write one locale's copy to the live Airbnb listing. Airbnb keeps a SEPARATE description per locale (`PUT /v2/listing_descriptions/{listingId}/{locale}`), which is why `locale` is part of the request and not a guess: a listing can carry twelve of them, and writing Italian copy into the English row is how a translation gets lost. Only the fields you send are written; Airbnb keeps the rest. `GET /v1/channels/airbnb/listings/{id}/settings?type=locales` lists the locales already synced for the listing. `description` is not an accepted field: Airbnb composes the public description from the sections (`summary`, `space`, `access`, …) and ignores a directly-supplied one. **A 200 does not by itself mean the change was applied.** On an established listing Airbnb LOCKS host-managed description fields — the write returns 200, reports them as locked, and applies nothing for them. The response reports `blockedFields`: the fields YOU sent that Airbnb dropped. `blockedFields: []` is what a landed write looks like; a non-empty list is still a 200 (the other fields really were written) with a `message` naming what was not. Reporting that as a clean success is the bug behind \"the description does not push to Airbnb\". This writes to AIRBNB. To write Repull's own canonical copy — the content a later publish distributes — use `PUT /v1/listings/{id}/content` with `locale`. Send `Idempotency-Key` to make a retry safe. Returns `403 listing_inactive` when the listing is inactive.
|
|
3287
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3288
|
+
# @param airbnb_description_write_request [AirbnbDescriptionWriteRequest]
|
|
3289
|
+
# @param [Hash] opts the optional parameters
|
|
3290
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
3291
|
+
# @return [Array<(AirbnbContentWriteResponse, Integer, Hash)>] AirbnbContentWriteResponse data, response status code and response headers
|
|
3292
|
+
def update_airbnb_listing_description_with_http_info(id, airbnb_description_write_request, opts = {})
|
|
3293
|
+
if @api_client.config.debugging
|
|
3294
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_description ...'
|
|
3295
|
+
end
|
|
3296
|
+
# verify the required parameter 'id' is set
|
|
3297
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3298
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_description"
|
|
3299
|
+
end
|
|
3300
|
+
# verify the required parameter 'airbnb_description_write_request' is set
|
|
3301
|
+
if @api_client.config.client_side_validation && airbnb_description_write_request.nil?
|
|
3302
|
+
fail ArgumentError, "Missing the required parameter 'airbnb_description_write_request' when calling AirbnbApi.update_airbnb_listing_description"
|
|
3303
|
+
end
|
|
3304
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
3305
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AirbnbApi.update_airbnb_listing_description, the character length must be smaller than or equal to 255.'
|
|
3306
|
+
end
|
|
3307
|
+
|
|
3308
|
+
# resource path
|
|
3309
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/descriptions'.sub('{id}', CGI.escape(id.to_s))
|
|
3310
|
+
|
|
3311
|
+
# query parameters
|
|
3312
|
+
query_params = opts[:query_params] || {}
|
|
3313
|
+
|
|
3314
|
+
# header parameters
|
|
3315
|
+
header_params = opts[:header_params] || {}
|
|
3316
|
+
# HTTP header 'Accept' (if needed)
|
|
3317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3318
|
+
# HTTP header 'Content-Type'
|
|
3319
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3320
|
+
if !content_type.nil?
|
|
3321
|
+
header_params['Content-Type'] = content_type
|
|
3322
|
+
end
|
|
3323
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3324
|
+
|
|
3325
|
+
# form parameters
|
|
3326
|
+
form_params = opts[:form_params] || {}
|
|
3327
|
+
|
|
3328
|
+
# http body (model)
|
|
3329
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_description_write_request)
|
|
3330
|
+
|
|
3331
|
+
# return_type
|
|
3332
|
+
return_type = opts[:debug_return_type] || 'AirbnbContentWriteResponse'
|
|
3333
|
+
|
|
3334
|
+
# auth_names
|
|
3335
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3336
|
+
|
|
3337
|
+
new_options = opts.merge(
|
|
3338
|
+
:operation => :"AirbnbApi.update_airbnb_listing_description",
|
|
3339
|
+
:header_params => header_params,
|
|
3340
|
+
:query_params => query_params,
|
|
3341
|
+
:form_params => form_params,
|
|
3342
|
+
:body => post_body,
|
|
3343
|
+
:auth_names => auth_names,
|
|
3344
|
+
:return_type => return_type
|
|
3345
|
+
)
|
|
3346
|
+
|
|
3347
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3348
|
+
if @api_client.config.debugging
|
|
3349
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3350
|
+
end
|
|
3351
|
+
return data, status_code, headers
|
|
3352
|
+
end
|
|
3353
|
+
|
|
3354
|
+
# Update property type, room type, quiet hours or check-in method
|
|
3355
|
+
# Change what kind of property the Airbnb listing is, when its quiet hours are, or how the guest gets in. Partial: only the fields you send are written. At least one required; an unknown field is refused by name rather than dropped. This is the UPDATE path for fields that previously had none. `POST /v1/listings` accepts a `propertyType` when a listing is CREATED and nothing could change it afterwards, so a listing mis-typed at import stayed mis-typed; the check-in method was mirrored and never exposed at all. **A 200 does not by itself mean the change was applied.** `property_type_category`, `property_type_group` and `check_in_option` are among the attributes Airbnb locks on established listings: the write returns 200, and Airbnb applies nothing for the locked ones. The response reports `blockedFields` — the fields YOU sent that Airbnb dropped — and `blockedFields: []` is what a landed write looks like. `GET …/details` reports the same list as `lockedFields` so you can check first. Canonical property type (the value Repull keeps and republishes) is set with `PUT /v1/listings/{id}/content` under `details`; this endpoint writes straight to Airbnb. Send `Idempotency-Key` to make a retry safe.
|
|
3356
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3357
|
+
# @param airbnb_listing_details_write_request [AirbnbListingDetailsWriteRequest]
|
|
3358
|
+
# @param [Hash] opts the optional parameters
|
|
3359
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
3360
|
+
# @return [AirbnbContentWriteResponse]
|
|
3361
|
+
def update_airbnb_listing_details(id, airbnb_listing_details_write_request, opts = {})
|
|
3362
|
+
data, _status_code, _headers = update_airbnb_listing_details_with_http_info(id, airbnb_listing_details_write_request, opts)
|
|
3363
|
+
data
|
|
3364
|
+
end
|
|
3365
|
+
|
|
3366
|
+
# Update property type, room type, quiet hours or check-in method
|
|
3367
|
+
# Change what kind of property the Airbnb listing is, when its quiet hours are, or how the guest gets in. Partial: only the fields you send are written. At least one required; an unknown field is refused by name rather than dropped. This is the UPDATE path for fields that previously had none. `POST /v1/listings` accepts a `propertyType` when a listing is CREATED and nothing could change it afterwards, so a listing mis-typed at import stayed mis-typed; the check-in method was mirrored and never exposed at all. **A 200 does not by itself mean the change was applied.** `property_type_category`, `property_type_group` and `check_in_option` are among the attributes Airbnb locks on established listings: the write returns 200, and Airbnb applies nothing for the locked ones. The response reports `blockedFields` — the fields YOU sent that Airbnb dropped — and `blockedFields: []` is what a landed write looks like. `GET …/details` reports the same list as `lockedFields` so you can check first. Canonical property type (the value Repull keeps and republishes) is set with `PUT /v1/listings/{id}/content` under `details`; this endpoint writes straight to Airbnb. Send `Idempotency-Key` to make a retry safe.
|
|
3368
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3369
|
+
# @param airbnb_listing_details_write_request [AirbnbListingDetailsWriteRequest]
|
|
3370
|
+
# @param [Hash] opts the optional parameters
|
|
3371
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
3372
|
+
# @return [Array<(AirbnbContentWriteResponse, Integer, Hash)>] AirbnbContentWriteResponse data, response status code and response headers
|
|
3373
|
+
def update_airbnb_listing_details_with_http_info(id, airbnb_listing_details_write_request, opts = {})
|
|
3374
|
+
if @api_client.config.debugging
|
|
3375
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_details ...'
|
|
3376
|
+
end
|
|
3377
|
+
# verify the required parameter 'id' is set
|
|
3378
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3379
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_details"
|
|
3380
|
+
end
|
|
3381
|
+
# verify the required parameter 'airbnb_listing_details_write_request' is set
|
|
3382
|
+
if @api_client.config.client_side_validation && airbnb_listing_details_write_request.nil?
|
|
3383
|
+
fail ArgumentError, "Missing the required parameter 'airbnb_listing_details_write_request' when calling AirbnbApi.update_airbnb_listing_details"
|
|
3384
|
+
end
|
|
3385
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
3386
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AirbnbApi.update_airbnb_listing_details, the character length must be smaller than or equal to 255.'
|
|
3387
|
+
end
|
|
3388
|
+
|
|
3389
|
+
# resource path
|
|
3390
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/details'.sub('{id}', CGI.escape(id.to_s))
|
|
3391
|
+
|
|
3392
|
+
# query parameters
|
|
3393
|
+
query_params = opts[:query_params] || {}
|
|
3394
|
+
|
|
3395
|
+
# header parameters
|
|
3396
|
+
header_params = opts[:header_params] || {}
|
|
3397
|
+
# HTTP header 'Accept' (if needed)
|
|
3398
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3399
|
+
# HTTP header 'Content-Type'
|
|
3400
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3401
|
+
if !content_type.nil?
|
|
3402
|
+
header_params['Content-Type'] = content_type
|
|
3403
|
+
end
|
|
3404
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3405
|
+
|
|
3406
|
+
# form parameters
|
|
3407
|
+
form_params = opts[:form_params] || {}
|
|
3408
|
+
|
|
3409
|
+
# http body (model)
|
|
3410
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_listing_details_write_request)
|
|
3411
|
+
|
|
3412
|
+
# return_type
|
|
3413
|
+
return_type = opts[:debug_return_type] || 'AirbnbContentWriteResponse'
|
|
2301
3414
|
|
|
2302
3415
|
# auth_names
|
|
2303
3416
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2304
3417
|
|
|
2305
3418
|
new_options = opts.merge(
|
|
2306
|
-
:operation => :"AirbnbApi.
|
|
3419
|
+
:operation => :"AirbnbApi.update_airbnb_listing_details",
|
|
2307
3420
|
:header_params => header_params,
|
|
2308
3421
|
:query_params => query_params,
|
|
2309
3422
|
:form_params => form_params,
|
|
@@ -2314,68 +3427,77 @@ module Repull
|
|
|
2314
3427
|
|
|
2315
3428
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2316
3429
|
if @api_client.config.debugging
|
|
2317
|
-
@api_client.config.logger.debug "API called: AirbnbApi#
|
|
3430
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2318
3431
|
end
|
|
2319
3432
|
return data, status_code, headers
|
|
2320
3433
|
end
|
|
2321
3434
|
|
|
2322
|
-
#
|
|
2323
|
-
#
|
|
2324
|
-
# @param id [String]
|
|
2325
|
-
# @param
|
|
3435
|
+
# Answer Airbnb permit questions
|
|
3436
|
+
# Answer the regulatory permit questions for a listing — the licence or registration number a city requires to keep the listing up. Read the questions first with `GET …/permits?source=live`: every answer is keyed by a `question_key` Airbnb asks for THIS listing, and the question's `answer_type` decides which value field applies (`text_value`, `date_value`, or `selected_options_value`). Answers are forwarded verbatim — nothing is defaulted or inferred, because a wrong licence number can take a listing down in a regulated city. Send `Idempotency-Key`: a timeout here leaves you unable to tell \"never arrived\" from \"arrived, response lost\", and this is a compliance filing. Airbnb refusing the answers (an unknown question key, a malformed licence number) is `422 airbnb_rejected` carrying Airbnb's own reason. An expired or revoked Airbnb connection is `403 connection_reauth_required`.
|
|
3437
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3438
|
+
# @param airbnb_permits_write_request [AirbnbPermitsWriteRequest]
|
|
2326
3439
|
# @param [Hash] opts the optional parameters
|
|
2327
|
-
# @
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
3440
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
3441
|
+
# @return [UpdateAirbnbListingPermits200Response]
|
|
3442
|
+
def update_airbnb_listing_permits(id, airbnb_permits_write_request, opts = {})
|
|
3443
|
+
data, _status_code, _headers = update_airbnb_listing_permits_with_http_info(id, airbnb_permits_write_request, opts)
|
|
3444
|
+
data
|
|
2331
3445
|
end
|
|
2332
3446
|
|
|
2333
|
-
#
|
|
2334
|
-
#
|
|
2335
|
-
# @param id [String]
|
|
2336
|
-
# @param
|
|
3447
|
+
# Answer Airbnb permit questions
|
|
3448
|
+
# Answer the regulatory permit questions for a listing — the licence or registration number a city requires to keep the listing up. Read the questions first with `GET …/permits?source=live`: every answer is keyed by a `question_key` Airbnb asks for THIS listing, and the question's `answer_type` decides which value field applies (`text_value`, `date_value`, or `selected_options_value`). Answers are forwarded verbatim — nothing is defaulted or inferred, because a wrong licence number can take a listing down in a regulated city. Send `Idempotency-Key`: a timeout here leaves you unable to tell \"never arrived\" from \"arrived, response lost\", and this is a compliance filing. Airbnb refusing the answers (an unknown question key, a malformed licence number) is `422 airbnb_rejected` carrying Airbnb's own reason. An expired or revoked Airbnb connection is `403 connection_reauth_required`.
|
|
3449
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3450
|
+
# @param airbnb_permits_write_request [AirbnbPermitsWriteRequest]
|
|
2337
3451
|
# @param [Hash] opts the optional parameters
|
|
2338
|
-
# @
|
|
2339
|
-
|
|
3452
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
3453
|
+
# @return [Array<(UpdateAirbnbListingPermits200Response, Integer, Hash)>] UpdateAirbnbListingPermits200Response data, response status code and response headers
|
|
3454
|
+
def update_airbnb_listing_permits_with_http_info(id, airbnb_permits_write_request, opts = {})
|
|
2340
3455
|
if @api_client.config.debugging
|
|
2341
|
-
@api_client.config.logger.debug 'Calling API: AirbnbApi.
|
|
3456
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_permits ...'
|
|
2342
3457
|
end
|
|
2343
3458
|
# verify the required parameter 'id' is set
|
|
2344
3459
|
if @api_client.config.client_side_validation && id.nil?
|
|
2345
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.
|
|
3460
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_permits"
|
|
2346
3461
|
end
|
|
2347
|
-
# verify the required parameter '
|
|
2348
|
-
if @api_client.config.client_side_validation &&
|
|
2349
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3462
|
+
# verify the required parameter 'airbnb_permits_write_request' is set
|
|
3463
|
+
if @api_client.config.client_side_validation && airbnb_permits_write_request.nil?
|
|
3464
|
+
fail ArgumentError, "Missing the required parameter 'airbnb_permits_write_request' when calling AirbnbApi.update_airbnb_listing_permits"
|
|
3465
|
+
end
|
|
3466
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
3467
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AirbnbApi.update_airbnb_listing_permits, the character length must be smaller than or equal to 255.'
|
|
2350
3468
|
end
|
|
3469
|
+
|
|
2351
3470
|
# resource path
|
|
2352
|
-
local_var_path = '/v1/channels/airbnb/listings/{id}/
|
|
3471
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/permits'.sub('{id}', CGI.escape(id.to_s))
|
|
2353
3472
|
|
|
2354
3473
|
# query parameters
|
|
2355
3474
|
query_params = opts[:query_params] || {}
|
|
2356
3475
|
|
|
2357
3476
|
# header parameters
|
|
2358
3477
|
header_params = opts[:header_params] || {}
|
|
3478
|
+
# HTTP header 'Accept' (if needed)
|
|
3479
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2359
3480
|
# HTTP header 'Content-Type'
|
|
2360
3481
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2361
3482
|
if !content_type.nil?
|
|
2362
3483
|
header_params['Content-Type'] = content_type
|
|
2363
3484
|
end
|
|
3485
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
2364
3486
|
|
|
2365
3487
|
# form parameters
|
|
2366
3488
|
form_params = opts[:form_params] || {}
|
|
2367
3489
|
|
|
2368
3490
|
# http body (model)
|
|
2369
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3491
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_permits_write_request)
|
|
2370
3492
|
|
|
2371
3493
|
# return_type
|
|
2372
|
-
return_type = opts[:debug_return_type]
|
|
3494
|
+
return_type = opts[:debug_return_type] || 'UpdateAirbnbListingPermits200Response'
|
|
2373
3495
|
|
|
2374
3496
|
# auth_names
|
|
2375
3497
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2376
3498
|
|
|
2377
3499
|
new_options = opts.merge(
|
|
2378
|
-
:operation => :"AirbnbApi.
|
|
3500
|
+
:operation => :"AirbnbApi.update_airbnb_listing_permits",
|
|
2379
3501
|
:header_params => header_params,
|
|
2380
3502
|
:query_params => query_params,
|
|
2381
3503
|
:form_params => form_params,
|
|
@@ -2386,13 +3508,87 @@ module Repull
|
|
|
2386
3508
|
|
|
2387
3509
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2388
3510
|
if @api_client.config.debugging
|
|
2389
|
-
@api_client.config.logger.debug "API called: AirbnbApi#
|
|
3511
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_permits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3512
|
+
end
|
|
3513
|
+
return data, status_code, headers
|
|
3514
|
+
end
|
|
3515
|
+
|
|
3516
|
+
# Update an Airbnb photo
|
|
3517
|
+
# Change one photo's caption, its position in the tour, the room it is filed under, or its metadata. **Write-side** — calls Airbnb upstream. Airbnb's photo endpoints are keyed by photo id alone, so the photo is proven to belong to the listing named in the path before anything is sent; a photo from another listing returns `404`, the same answer a photo that does not exist gets. On success both stored copies are updated — the Airbnb mirror `GET /photos` serves AND the canonical photo tour behind `GET /v1/listings/{id}` — so a read straight after this write returns the new value instead of waiting for the next sync. `stored` says whether that succeeded; `false` means Airbnb accepted the change but our copy will only catch up at the next sync. To move several photos at once use `PUT /photos/order`: it is one call instead of N, it validates the whole order before writing anything, and it reports exactly what landed if Airbnb refuses part-way. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3518
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3519
|
+
# @param update_airbnb_listing_photo_request [UpdateAirbnbListingPhotoRequest]
|
|
3520
|
+
# @param [Hash] opts the optional parameters
|
|
3521
|
+
# @return [UpdateAirbnbListingPhoto200Response]
|
|
3522
|
+
def update_airbnb_listing_photo(id, update_airbnb_listing_photo_request, opts = {})
|
|
3523
|
+
data, _status_code, _headers = update_airbnb_listing_photo_with_http_info(id, update_airbnb_listing_photo_request, opts)
|
|
3524
|
+
data
|
|
3525
|
+
end
|
|
3526
|
+
|
|
3527
|
+
# Update an Airbnb photo
|
|
3528
|
+
# Change one photo's caption, its position in the tour, the room it is filed under, or its metadata. **Write-side** — calls Airbnb upstream. Airbnb's photo endpoints are keyed by photo id alone, so the photo is proven to belong to the listing named in the path before anything is sent; a photo from another listing returns `404`, the same answer a photo that does not exist gets. On success both stored copies are updated — the Airbnb mirror `GET /photos` serves AND the canonical photo tour behind `GET /v1/listings/{id}` — so a read straight after this write returns the new value instead of waiting for the next sync. `stored` says whether that succeeded; `false` means Airbnb accepted the change but our copy will only catch up at the next sync. To move several photos at once use `PUT /photos/order`: it is one call instead of N, it validates the whole order before writing anything, and it reports exactly what landed if Airbnb refuses part-way. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3529
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3530
|
+
# @param update_airbnb_listing_photo_request [UpdateAirbnbListingPhotoRequest]
|
|
3531
|
+
# @param [Hash] opts the optional parameters
|
|
3532
|
+
# @return [Array<(UpdateAirbnbListingPhoto200Response, Integer, Hash)>] UpdateAirbnbListingPhoto200Response data, response status code and response headers
|
|
3533
|
+
def update_airbnb_listing_photo_with_http_info(id, update_airbnb_listing_photo_request, opts = {})
|
|
3534
|
+
if @api_client.config.debugging
|
|
3535
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_photo ...'
|
|
3536
|
+
end
|
|
3537
|
+
# verify the required parameter 'id' is set
|
|
3538
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3539
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_photo"
|
|
3540
|
+
end
|
|
3541
|
+
# verify the required parameter 'update_airbnb_listing_photo_request' is set
|
|
3542
|
+
if @api_client.config.client_side_validation && update_airbnb_listing_photo_request.nil?
|
|
3543
|
+
fail ArgumentError, "Missing the required parameter 'update_airbnb_listing_photo_request' when calling AirbnbApi.update_airbnb_listing_photo"
|
|
3544
|
+
end
|
|
3545
|
+
# resource path
|
|
3546
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/photos'.sub('{id}', CGI.escape(id.to_s))
|
|
3547
|
+
|
|
3548
|
+
# query parameters
|
|
3549
|
+
query_params = opts[:query_params] || {}
|
|
3550
|
+
|
|
3551
|
+
# header parameters
|
|
3552
|
+
header_params = opts[:header_params] || {}
|
|
3553
|
+
# HTTP header 'Accept' (if needed)
|
|
3554
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3555
|
+
# HTTP header 'Content-Type'
|
|
3556
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3557
|
+
if !content_type.nil?
|
|
3558
|
+
header_params['Content-Type'] = content_type
|
|
3559
|
+
end
|
|
3560
|
+
|
|
3561
|
+
# form parameters
|
|
3562
|
+
form_params = opts[:form_params] || {}
|
|
3563
|
+
|
|
3564
|
+
# http body (model)
|
|
3565
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_listing_photo_request)
|
|
3566
|
+
|
|
3567
|
+
# return_type
|
|
3568
|
+
return_type = opts[:debug_return_type] || 'UpdateAirbnbListingPhoto200Response'
|
|
3569
|
+
|
|
3570
|
+
# auth_names
|
|
3571
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3572
|
+
|
|
3573
|
+
new_options = opts.merge(
|
|
3574
|
+
:operation => :"AirbnbApi.update_airbnb_listing_photo",
|
|
3575
|
+
:header_params => header_params,
|
|
3576
|
+
:query_params => query_params,
|
|
3577
|
+
:form_params => form_params,
|
|
3578
|
+
:body => post_body,
|
|
3579
|
+
:auth_names => auth_names,
|
|
3580
|
+
:return_type => return_type
|
|
3581
|
+
)
|
|
3582
|
+
|
|
3583
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
3584
|
+
if @api_client.config.debugging
|
|
3585
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2390
3586
|
end
|
|
2391
3587
|
return data, status_code, headers
|
|
2392
3588
|
end
|
|
2393
3589
|
|
|
2394
3590
|
# Update Airbnb pricing
|
|
2395
|
-
# Push pricing changes to Airbnb. The `type` discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date `calendar`). `type: \"calendar\"` carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object.
|
|
3591
|
+
# Push pricing changes to Airbnb. The `type` discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date `calendar`). `type: \"calendar\"` carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object. `{id}` is the **Repull listing id** (from `GET /v1/properties` or `GET /v1/channels/airbnb/listings`), not the Airbnb listing id — Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb: a malformed body is `422 invalid_params` naming the `field`. Calendar operations accept only the documented fields. **Blocking dates:** Airbnb requires a `busy_subtype` whenever `availability` is `\"unavailable\"`. If an operation leaves it out, Repull sends `busy_subtype: \"BLOCKED_BY_HOST\"`; send `\"OUTSIDE_RESERVATION\"` for dates held by a booking made on another channel. **Errors:** `403 listing_not_api_connected` — Airbnb was never told to sync this listing (its `syncCategory` is `none`); the host must switch API sync on for it in Airbnb, reconnecting the account will not help. `403 connection_reauth_required` — Airbnb no longer accepts the connection at all (reconnect; retrying won't help). `403 listing_inactive` — the listing is inactive. `404 not_found` — no Airbnb-connected listing with this id in the workspace. `422 airbnb_rejected` — Airbnb refused the change; `message` carries its reason. `429 airbnb_rate_limited` — back off. `502 airbnb_error` — Airbnb outage or timeout; retry.
|
|
2396
3592
|
# @param id [String]
|
|
2397
3593
|
# @param airbnb_pricing_write_request [AirbnbPricingWriteRequest]
|
|
2398
3594
|
# @param [Hash] opts the optional parameters
|
|
@@ -2403,7 +3599,7 @@ module Repull
|
|
|
2403
3599
|
end
|
|
2404
3600
|
|
|
2405
3601
|
# Update Airbnb pricing
|
|
2406
|
-
# Push pricing changes to Airbnb. The `type` discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date `calendar`). `type: \"calendar\"` carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object.
|
|
3602
|
+
# Push pricing changes to Airbnb. The `type` discriminator selects the sub-resource (model, standard settings, LOS, rate-plan, fees, currency, rule, or per-date `calendar`). `type: \"calendar\"` carries the full per-date restriction set — nightly price, min/max nights, closed-to-arrival, closed-to-departure, and stop-sell (`availability: \"unavailable\"`). For settings sub-resources the full object is replaced — GET first, mutate locally, then PUT the whole object. `{id}` is the **Repull listing id** (from `GET /v1/properties` or `GET /v1/channels/airbnb/listings`), not the Airbnb listing id — Repull translates it before calling Airbnb. The body is validated before anything reaches Airbnb: a malformed body is `422 invalid_params` naming the `field`. Calendar operations accept only the documented fields. **Blocking dates:** Airbnb requires a `busy_subtype` whenever `availability` is `\"unavailable\"`. If an operation leaves it out, Repull sends `busy_subtype: \"BLOCKED_BY_HOST\"`; send `\"OUTSIDE_RESERVATION\"` for dates held by a booking made on another channel. **Errors:** `403 listing_not_api_connected` — Airbnb was never told to sync this listing (its `syncCategory` is `none`); the host must switch API sync on for it in Airbnb, reconnecting the account will not help. `403 connection_reauth_required` — Airbnb no longer accepts the connection at all (reconnect; retrying won't help). `403 listing_inactive` — the listing is inactive. `404 not_found` — no Airbnb-connected listing with this id in the workspace. `422 airbnb_rejected` — Airbnb refused the change; `message` carries its reason. `429 airbnb_rate_limited` — back off. `502 airbnb_error` — Airbnb outage or timeout; retry.
|
|
2407
3603
|
# @param id [String]
|
|
2408
3604
|
# @param airbnb_pricing_write_request [AirbnbPricingWriteRequest]
|
|
2409
3605
|
# @param [Hash] opts the optional parameters
|
|
@@ -2428,6 +3624,8 @@ module Repull
|
|
|
2428
3624
|
|
|
2429
3625
|
# header parameters
|
|
2430
3626
|
header_params = opts[:header_params] || {}
|
|
3627
|
+
# HTTP header 'Accept' (if needed)
|
|
3628
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2431
3629
|
# HTTP header 'Content-Type'
|
|
2432
3630
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2433
3631
|
if !content_type.nil?
|
|
@@ -2463,8 +3661,170 @@ module Repull
|
|
|
2463
3661
|
return data, status_code, headers
|
|
2464
3662
|
end
|
|
2465
3663
|
|
|
3664
|
+
# Update an Airbnb room
|
|
3665
|
+
# Change a room's type, number, privacy or sleeping arrangement. **Write-side** — calls Airbnb upstream. Pass the Airbnb-side room id as `?roomId=` and send only the fields you want to change. `beds` REPLACES the room's whole arrangement — that is Airbnb's semantics for the field — so send every bed the room has, not just the changed one. Airbnb's room endpoints are keyed by room id alone, so the room is proven to belong to the listing named in the path before anything is sent; a room from another listing returns `404`, the same answer a room that does not exist gets. On success both stored copies are rebuilt to match, so a read straight after this write returns the new arrangement. `stored` says whether that succeeded. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3666
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3667
|
+
# @param room_id [String] Airbnb-side room id to update.
|
|
3668
|
+
# @param update_airbnb_listing_room_request [UpdateAirbnbListingRoomRequest]
|
|
3669
|
+
# @param [Hash] opts the optional parameters
|
|
3670
|
+
# @return [UpdateAirbnbListingRoom200Response]
|
|
3671
|
+
def update_airbnb_listing_room(id, room_id, update_airbnb_listing_room_request, opts = {})
|
|
3672
|
+
data, _status_code, _headers = update_airbnb_listing_room_with_http_info(id, room_id, update_airbnb_listing_room_request, opts)
|
|
3673
|
+
data
|
|
3674
|
+
end
|
|
3675
|
+
|
|
3676
|
+
# Update an Airbnb room
|
|
3677
|
+
# Change a room's type, number, privacy or sleeping arrangement. **Write-side** — calls Airbnb upstream. Pass the Airbnb-side room id as `?roomId=` and send only the fields you want to change. `beds` REPLACES the room's whole arrangement — that is Airbnb's semantics for the field — so send every bed the room has, not just the changed one. Airbnb's room endpoints are keyed by room id alone, so the room is proven to belong to the listing named in the path before anything is sent; a room from another listing returns `404`, the same answer a room that does not exist gets. On success both stored copies are rebuilt to match, so a read straight after this write returns the new arrangement. `stored` says whether that succeeded. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
3678
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3679
|
+
# @param room_id [String] Airbnb-side room id to update.
|
|
3680
|
+
# @param update_airbnb_listing_room_request [UpdateAirbnbListingRoomRequest]
|
|
3681
|
+
# @param [Hash] opts the optional parameters
|
|
3682
|
+
# @return [Array<(UpdateAirbnbListingRoom200Response, Integer, Hash)>] UpdateAirbnbListingRoom200Response data, response status code and response headers
|
|
3683
|
+
def update_airbnb_listing_room_with_http_info(id, room_id, update_airbnb_listing_room_request, opts = {})
|
|
3684
|
+
if @api_client.config.debugging
|
|
3685
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_room ...'
|
|
3686
|
+
end
|
|
3687
|
+
# verify the required parameter 'id' is set
|
|
3688
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3689
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_room"
|
|
3690
|
+
end
|
|
3691
|
+
# verify the required parameter 'room_id' is set
|
|
3692
|
+
if @api_client.config.client_side_validation && room_id.nil?
|
|
3693
|
+
fail ArgumentError, "Missing the required parameter 'room_id' when calling AirbnbApi.update_airbnb_listing_room"
|
|
3694
|
+
end
|
|
3695
|
+
# verify the required parameter 'update_airbnb_listing_room_request' is set
|
|
3696
|
+
if @api_client.config.client_side_validation && update_airbnb_listing_room_request.nil?
|
|
3697
|
+
fail ArgumentError, "Missing the required parameter 'update_airbnb_listing_room_request' when calling AirbnbApi.update_airbnb_listing_room"
|
|
3698
|
+
end
|
|
3699
|
+
# resource path
|
|
3700
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/rooms'.sub('{id}', CGI.escape(id.to_s))
|
|
3701
|
+
|
|
3702
|
+
# query parameters
|
|
3703
|
+
query_params = opts[:query_params] || {}
|
|
3704
|
+
query_params[:'roomId'] = room_id
|
|
3705
|
+
|
|
3706
|
+
# header parameters
|
|
3707
|
+
header_params = opts[:header_params] || {}
|
|
3708
|
+
# HTTP header 'Accept' (if needed)
|
|
3709
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3710
|
+
# HTTP header 'Content-Type'
|
|
3711
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3712
|
+
if !content_type.nil?
|
|
3713
|
+
header_params['Content-Type'] = content_type
|
|
3714
|
+
end
|
|
3715
|
+
|
|
3716
|
+
# form parameters
|
|
3717
|
+
form_params = opts[:form_params] || {}
|
|
3718
|
+
|
|
3719
|
+
# http body (model)
|
|
3720
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_airbnb_listing_room_request)
|
|
3721
|
+
|
|
3722
|
+
# return_type
|
|
3723
|
+
return_type = opts[:debug_return_type] || 'UpdateAirbnbListingRoom200Response'
|
|
3724
|
+
|
|
3725
|
+
# auth_names
|
|
3726
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3727
|
+
|
|
3728
|
+
new_options = opts.merge(
|
|
3729
|
+
:operation => :"AirbnbApi.update_airbnb_listing_room",
|
|
3730
|
+
:header_params => header_params,
|
|
3731
|
+
:query_params => query_params,
|
|
3732
|
+
:form_params => form_params,
|
|
3733
|
+
:body => post_body,
|
|
3734
|
+
:auth_names => auth_names,
|
|
3735
|
+
:return_type => return_type
|
|
3736
|
+
)
|
|
3737
|
+
|
|
3738
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3739
|
+
if @api_client.config.debugging
|
|
3740
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_room\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3741
|
+
end
|
|
3742
|
+
return data, status_code, headers
|
|
3743
|
+
end
|
|
3744
|
+
|
|
3745
|
+
# Update guest-safety disclosures
|
|
3746
|
+
# Declare or retract the guest-safety disclosures on the live Airbnb listing. **This is a MERGE, not a replacement.** Airbnb keeps one value per disclosure type: a type you leave out keeps the value it has, and to retract one you send it with `value: false`. A full replacement would let a partial request silently un-declare a security camera — a guest-safety statement, not a preference. Only the disclosures are sent upstream. The same Airbnb endpoint carries the cancellation policy and instant-book settings, and this endpoint never touches them. Send `Idempotency-Key` to make a retry safe. Airbnb refusing the change is `422 airbnb_rejected` with Airbnb's own reason; an expired or revoked connection is `403 connection_reauth_required`.
|
|
3747
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3748
|
+
# @param airbnb_safety_disclosures_write_request [AirbnbSafetyDisclosuresWriteRequest]
|
|
3749
|
+
# @param [Hash] opts the optional parameters
|
|
3750
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
3751
|
+
# @return [UpdateAirbnbListingSafetyDisclosures200Response]
|
|
3752
|
+
def update_airbnb_listing_safety_disclosures(id, airbnb_safety_disclosures_write_request, opts = {})
|
|
3753
|
+
data, _status_code, _headers = update_airbnb_listing_safety_disclosures_with_http_info(id, airbnb_safety_disclosures_write_request, opts)
|
|
3754
|
+
data
|
|
3755
|
+
end
|
|
3756
|
+
|
|
3757
|
+
# Update guest-safety disclosures
|
|
3758
|
+
# Declare or retract the guest-safety disclosures on the live Airbnb listing. **This is a MERGE, not a replacement.** Airbnb keeps one value per disclosure type: a type you leave out keeps the value it has, and to retract one you send it with `value: false`. A full replacement would let a partial request silently un-declare a security camera — a guest-safety statement, not a preference. Only the disclosures are sent upstream. The same Airbnb endpoint carries the cancellation policy and instant-book settings, and this endpoint never touches them. Send `Idempotency-Key` to make a retry safe. Airbnb refusing the change is `422 airbnb_rejected` with Airbnb's own reason; an expired or revoked connection is `403 connection_reauth_required`.
|
|
3759
|
+
# @param id [String] Repull listing id (numeric string).
|
|
3760
|
+
# @param airbnb_safety_disclosures_write_request [AirbnbSafetyDisclosuresWriteRequest]
|
|
3761
|
+
# @param [Hash] opts the optional parameters
|
|
3762
|
+
# @option opts [String] :idempotency_key Makes a retry of this request safe. Send a unique string (a UUID generated at the point you build the request) and the response is stored for 24 hours: a repeat with the SAME key replays that stored response — tagged `Idempotency-Status: cached` — without running the operation again, so no duplicate reservation, guest or guest message is created. - Same key while the first request is still in flight → `409 idempotency_key_in_use`. - Same key with a DIFFERENT payload → `422 idempotency_key_reused`. Generate a new key per distinct request; reuse one only when retrying that exact request. - Responses with status >= 500 are deliberately not stored, so a server error stays retryable.
|
|
3763
|
+
# @return [Array<(UpdateAirbnbListingSafetyDisclosures200Response, Integer, Hash)>] UpdateAirbnbListingSafetyDisclosures200Response data, response status code and response headers
|
|
3764
|
+
def update_airbnb_listing_safety_disclosures_with_http_info(id, airbnb_safety_disclosures_write_request, opts = {})
|
|
3765
|
+
if @api_client.config.debugging
|
|
3766
|
+
@api_client.config.logger.debug 'Calling API: AirbnbApi.update_airbnb_listing_safety_disclosures ...'
|
|
3767
|
+
end
|
|
3768
|
+
# verify the required parameter 'id' is set
|
|
3769
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
3770
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.update_airbnb_listing_safety_disclosures"
|
|
3771
|
+
end
|
|
3772
|
+
# verify the required parameter 'airbnb_safety_disclosures_write_request' is set
|
|
3773
|
+
if @api_client.config.client_side_validation && airbnb_safety_disclosures_write_request.nil?
|
|
3774
|
+
fail ArgumentError, "Missing the required parameter 'airbnb_safety_disclosures_write_request' when calling AirbnbApi.update_airbnb_listing_safety_disclosures"
|
|
3775
|
+
end
|
|
3776
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
3777
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling AirbnbApi.update_airbnb_listing_safety_disclosures, the character length must be smaller than or equal to 255.'
|
|
3778
|
+
end
|
|
3779
|
+
|
|
3780
|
+
# resource path
|
|
3781
|
+
local_var_path = '/v1/channels/airbnb/listings/{id}/safety-disclosures'.sub('{id}', CGI.escape(id.to_s))
|
|
3782
|
+
|
|
3783
|
+
# query parameters
|
|
3784
|
+
query_params = opts[:query_params] || {}
|
|
3785
|
+
|
|
3786
|
+
# header parameters
|
|
3787
|
+
header_params = opts[:header_params] || {}
|
|
3788
|
+
# HTTP header 'Accept' (if needed)
|
|
3789
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3790
|
+
# HTTP header 'Content-Type'
|
|
3791
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3792
|
+
if !content_type.nil?
|
|
3793
|
+
header_params['Content-Type'] = content_type
|
|
3794
|
+
end
|
|
3795
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
3796
|
+
|
|
3797
|
+
# form parameters
|
|
3798
|
+
form_params = opts[:form_params] || {}
|
|
3799
|
+
|
|
3800
|
+
# http body (model)
|
|
3801
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(airbnb_safety_disclosures_write_request)
|
|
3802
|
+
|
|
3803
|
+
# return_type
|
|
3804
|
+
return_type = opts[:debug_return_type] || 'UpdateAirbnbListingSafetyDisclosures200Response'
|
|
3805
|
+
|
|
3806
|
+
# auth_names
|
|
3807
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3808
|
+
|
|
3809
|
+
new_options = opts.merge(
|
|
3810
|
+
:operation => :"AirbnbApi.update_airbnb_listing_safety_disclosures",
|
|
3811
|
+
:header_params => header_params,
|
|
3812
|
+
:query_params => query_params,
|
|
3813
|
+
:form_params => form_params,
|
|
3814
|
+
:body => post_body,
|
|
3815
|
+
:auth_names => auth_names,
|
|
3816
|
+
:return_type => return_type
|
|
3817
|
+
)
|
|
3818
|
+
|
|
3819
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3820
|
+
if @api_client.config.debugging
|
|
3821
|
+
@api_client.config.logger.debug "API called: AirbnbApi#update_airbnb_listing_safety_disclosures\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3822
|
+
end
|
|
3823
|
+
return data, status_code, headers
|
|
3824
|
+
end
|
|
3825
|
+
|
|
2466
3826
|
# Edit / react to / mark an Airbnb message
|
|
2467
|
-
# Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The `action` discriminator selects the operation: - `edit` — replace message text (requires `message`). - `unsend` — retract the message. - `read` — mark the message as read. - `react` — add a reaction (requires `reaction`). Requires a connected Airbnb host, else `404 no_connection`.
|
|
3827
|
+
# Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The `action` discriminator selects the operation: - `edit` — replace message text (requires `message`). - `unsend` — retract the message. - `read` — mark the message as read. - `react` — add a reaction (requires `reaction`). Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2468
3828
|
# @param thread_id [String] Airbnb thread id.
|
|
2469
3829
|
# @param message_id [String] Airbnb message id within the thread.
|
|
2470
3830
|
# @param update_airbnb_message_request [UpdateAirbnbMessageRequest]
|
|
@@ -2476,7 +3836,7 @@ module Repull
|
|
|
2476
3836
|
end
|
|
2477
3837
|
|
|
2478
3838
|
# Edit / react to / mark an Airbnb message
|
|
2479
|
-
# Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The `action` discriminator selects the operation: - `edit` — replace message text (requires `message`). - `unsend` — retract the message. - `read` — mark the message as read. - `react` — add a reaction (requires `reaction`). Requires a connected Airbnb host, else `404 no_connection`.
|
|
3839
|
+
# Act on a single message in an Airbnb thread. **Write-side** — calls Airbnb upstream. The `action` discriminator selects the operation: - `edit` — replace message text (requires `message`). - `unsend` — retract the message. - `read` — mark the message as read. - `react` — add a reaction (requires `reaction`). Requires a connected Airbnb host, else `404 no_connection`. Returns `403 listing_inactive` when the listing this resolves to is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2480
3840
|
# @param thread_id [String] Airbnb thread id.
|
|
2481
3841
|
# @param message_id [String] Airbnb message id within the thread.
|
|
2482
3842
|
# @param update_airbnb_message_request [UpdateAirbnbMessageRequest]
|
|
@@ -2544,21 +3904,23 @@ module Repull
|
|
|
2544
3904
|
end
|
|
2545
3905
|
|
|
2546
3906
|
# Upload photos to Airbnb
|
|
2547
|
-
# Upload one or more photos to an Airbnb listing.
|
|
3907
|
+
# Upload one or more photos to an Airbnb listing. `image` is base64 image DATA, not a url — a `data:image/jpeg;base64,…` prefix is accepted and stripped, and the decoded image must be under 25 MB. (This operation previously documented public image urls that Airbnb would fetch. It never did: a url arrived at Airbnb as a ~60-byte image.) Airbnb assigns the photo id and CDN urls, so the newly uploaded photos appear in `GET /photos` after the next sync. Caption, order and room assignment can be set straight away with `PATCH /photos`, `PUT /photos/order` and `PUT /photos/cover`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2548
3908
|
# @param id [String]
|
|
3909
|
+
# @param upload_airbnb_listing_photos_request [UploadAirbnbListingPhotosRequest]
|
|
2549
3910
|
# @param [Hash] opts the optional parameters
|
|
2550
3911
|
# @return [nil]
|
|
2551
|
-
def upload_airbnb_listing_photos(id, opts = {})
|
|
2552
|
-
upload_airbnb_listing_photos_with_http_info(id, opts)
|
|
3912
|
+
def upload_airbnb_listing_photos(id, upload_airbnb_listing_photos_request, opts = {})
|
|
3913
|
+
upload_airbnb_listing_photos_with_http_info(id, upload_airbnb_listing_photos_request, opts)
|
|
2553
3914
|
nil
|
|
2554
3915
|
end
|
|
2555
3916
|
|
|
2556
3917
|
# Upload photos to Airbnb
|
|
2557
|
-
# Upload one or more photos to an Airbnb listing.
|
|
3918
|
+
# Upload one or more photos to an Airbnb listing. `image` is base64 image DATA, not a url — a `data:image/jpeg;base64,…` prefix is accepted and stripped, and the decoded image must be under 25 MB. (This operation previously documented public image urls that Airbnb would fetch. It never did: a url arrived at Airbnb as a ~60-byte image.) Airbnb assigns the photo id and CDN urls, so the newly uploaded photos appear in `GET /photos` after the next sync. Caption, order and room assignment can be set straight away with `PATCH /photos`, `PUT /photos/order` and `PUT /photos/cover`. Returns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.
|
|
2558
3919
|
# @param id [String]
|
|
3920
|
+
# @param upload_airbnb_listing_photos_request [UploadAirbnbListingPhotosRequest]
|
|
2559
3921
|
# @param [Hash] opts the optional parameters
|
|
2560
3922
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2561
|
-
def upload_airbnb_listing_photos_with_http_info(id, opts = {})
|
|
3923
|
+
def upload_airbnb_listing_photos_with_http_info(id, upload_airbnb_listing_photos_request, opts = {})
|
|
2562
3924
|
if @api_client.config.debugging
|
|
2563
3925
|
@api_client.config.logger.debug 'Calling API: AirbnbApi.upload_airbnb_listing_photos ...'
|
|
2564
3926
|
end
|
|
@@ -2566,6 +3928,10 @@ module Repull
|
|
|
2566
3928
|
if @api_client.config.client_side_validation && id.nil?
|
|
2567
3929
|
fail ArgumentError, "Missing the required parameter 'id' when calling AirbnbApi.upload_airbnb_listing_photos"
|
|
2568
3930
|
end
|
|
3931
|
+
# verify the required parameter 'upload_airbnb_listing_photos_request' is set
|
|
3932
|
+
if @api_client.config.client_side_validation && upload_airbnb_listing_photos_request.nil?
|
|
3933
|
+
fail ArgumentError, "Missing the required parameter 'upload_airbnb_listing_photos_request' when calling AirbnbApi.upload_airbnb_listing_photos"
|
|
3934
|
+
end
|
|
2569
3935
|
# resource path
|
|
2570
3936
|
local_var_path = '/v1/channels/airbnb/listings/{id}/photos'.sub('{id}', CGI.escape(id.to_s))
|
|
2571
3937
|
|
|
@@ -2574,12 +3940,19 @@ module Repull
|
|
|
2574
3940
|
|
|
2575
3941
|
# header parameters
|
|
2576
3942
|
header_params = opts[:header_params] || {}
|
|
3943
|
+
# HTTP header 'Accept' (if needed)
|
|
3944
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3945
|
+
# HTTP header 'Content-Type'
|
|
3946
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3947
|
+
if !content_type.nil?
|
|
3948
|
+
header_params['Content-Type'] = content_type
|
|
3949
|
+
end
|
|
2577
3950
|
|
|
2578
3951
|
# form parameters
|
|
2579
3952
|
form_params = opts[:form_params] || {}
|
|
2580
3953
|
|
|
2581
3954
|
# http body (model)
|
|
2582
|
-
post_body = opts[:debug_body]
|
|
3955
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(upload_airbnb_listing_photos_request)
|
|
2583
3956
|
|
|
2584
3957
|
# return_type
|
|
2585
3958
|
return_type = opts[:debug_return_type]
|