Esta é uma tradução automática

Anúncio AirPort Pesquisa

A API de Listagens de Carros permite que os usuários pesquisem carros para alugar em vários Sistemas Globais de Distribuição (GDS).

E fornecedores, e para reservar carros com códigos de desconto e/ou cupons.

Para obter mais informações sobre a API de Listagens, consulte a documentação da API de Listagens.

1. Construa o objeto de solicitação usando as classes definidas no 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. Faça a chamada à API usando o cliente de serviço.

Response<CarListingsResponse> carListingsResponse = 
        xapClient.execute(getCarsListingsOperation);
Esta página foi útil?
Como podemos melhorar esse conteúdo?
Agradecemos por nos ajudar a melhorar.