Esta traducción se ha generado automáticamente

Anuncio n.ºAirPort ar búsqueda

La API de anuncios de coches permite a los usuarios buscar coches de alquiler en varios sistemas de distribución global (GDS)

Y a los proveedores, y para reservar coches con descuentos y/o códigos promocionales.

Si quieres más información sobre la API de anuncios, echa un vistazo a la documentación de la API de anuncios de.

1. Crea el objeto de solicitud utilizando las clases definidas en el 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. Haz la llamada a la API usando el cliente del servicio.

Response<CarListingsResponse> carListingsResponse = 
        xapClient.execute(getCarsListingsOperation);
¿Te ha resultado útil esta página?
¿Cómo podemos mejorar este contenido?
¡Gracias por ayudarnos a mejorar!