此為系統自動產生的翻譯

房源編號 AirPort 搜尋

「租車清單 API」讓使用者能夠在多個全球分銷系統 (GDS) 中搜尋租車資訊

以及供應商,並使用折扣碼和/或優惠券代碼預訂車輛。

如需有關「Listings API」的更多資訊,請參閱的「Listings API」文件

1. 使用 SDK 中定義的類別建立請求物件

GetCarsListingsOperationParams getCarsListingsOperationParams =
        GetCarsListingsOperationParams.builder().partnerTransactionId("EWSCar_Automation")
                //Three letter code for the airport at which the customer would like to pick up the car.
                //Supported values: standard 3 letter IATA Airport Code.
                //Cannot coexist with other pickup parameters, only one pickup parameter is allowed per
                //request.
                .pickupAirport("MCO")
                //Three letter code for the airport at which the customer would like to drop off the
                //car.
                //Supported values: standard 3 letter IATA Airport Code.
                //Cannot coexist with other drop off parameters, only one drop off parameter is allowed
                //per request.
                //If no drop off location is specified, it is assumed that the customer will be dropping
                //the car off at the same location at which they picked it up.
                .dropOffAirport("MCO")
                //Requested car pickup date and time.
                //Date should be ISO8601 Date format.The supported search window is today to 330 days in
                //the future.
                //(Note that each rental counter has different hours of operation. If you select a time
                //in the middle of the night there may be no inventory available as all locations may be
                //closed.)
                .pickupTime(LocalDateTime.now().plusDays(5))
                //Requested car drop off date and time.
                //Date should be ISO8601 Date format.The supported search window is today to 330 days in
                //the future.
                //The drop-off datetime should occur at least 2 hours after the pickup datetime.
                .dropOffTime(LocalDateTime.now().plusDays(8))
                //The maximum number of search results that will be returned by the query.
                .limit(5).links(linksList).build();

GetCarsListingsOperation getCarsListingsOperation =
        new GetCarsListingsOperation(getCarsListingsOperationParams);

2. 使用服務客戶端進行 API 呼叫。

Response<CarListingsResponse> carListingsResponse = 
        xapClient.execute(getCarsListingsOperation);
這個頁面有幫助嗎?
我們能如何改善內容?
感謝您協助我們進行改善!