此内容尚无该语言版本

Lodging Quotes

Using the Lodging Quotes API to return the price and availability of a Vrbo property.

For details on retrieving property IDs, refer to Retrieve Property Static Data. For more information on the Quotes API, see Quotes API documentation.

1. Build the request object using the classes defined in the SDK

GetLodgingQuotesOperationParams quotesOperationParams =
        GetLodgingQuotesOperationParams.builder()
            .partnerTransactionId("PARTNER TRANSACTION ID")
            // Check-in 5 days from now
            .checkIn(LocalDate.now().plusDays(5))
            // Check-out 10 days from now
            .checkOut(LocalDate.now().plusDays(10))
            // Vrbo Property IDs to search for
            .propertyIds(new HashSet<>(Arrays.asList("87704892","12410858")))
            // The links to return, WEB includes WS (Web Search Result Page) and WD (Web Details Page)
            .links(Collections.singletonList(GetLodgingQuotesOperationParams.Links.WEB))
            .build();

GetLodgingQuotesOperation quotesOperation = 
        new GetLodgingQuotesOperation(quotesOperationParams);

2. Make the API call using service client.

Response<LodgingQuotesResponse> hotelQuotesResponse =
        client.execute(quotesOperation);
您觉得这个页面有用吗?
我们该如何改进这些内容?
感谢您帮助我们改进!