public interface RidesService
| Modifier and Type | Method and Description |
|---|---|
retrofit2.Call<java.lang.Void> |
cancelCurrentRide()
Cancels the current ride of a user.
|
retrofit2.Call<java.lang.Void> |
cancelRide(java.lang.String rideId)
Cancels an ongoing Ride for a user.
|
retrofit2.Call<RideEstimate> |
estimateRide(RideRequestParameters rideRequestParameters)
The request estimate endpoint allows a ride to be estimated given the desired product, start,
and end locations.
|
retrofit2.Call<Ride> |
getCurrentRide()
Gets the current ride a user is on.
|
retrofit2.Call<PaymentMethodsResponse> |
getPaymentMethods()
Gets the
PaymentMethods of user and their last used method ID. |
retrofit2.Call<TimeEstimatesResponse> |
getPickupTimeEstimate(float startLatitude,
float startLongitude,
java.lang.String productId)
Gets ETAs for all products offered at a given location, with the responses expressed as
integers in seconds.
|
retrofit2.Call<Place> |
getPlace(java.lang.String placeId)
Gets information about a user's Place.
|
retrofit2.Call<PriceEstimatesResponse> |
getPriceEstimates(float startLatitude,
float startLongitude,
float endLatitude,
float endLongitude)
Gets an estimated price range for each product offered at a given location.
|
retrofit2.Call<Product> |
getProduct(java.lang.String productId)
Gets information about a specific product.
|
retrofit2.Call<ProductsResponse> |
getProducts(float latitude,
float longitude)
Gets information about the products offered at a given location.
|
retrofit2.Call<Promotion> |
getPromotions(float startLatitude,
float startLongitude,
float endLatitude,
float endLongitude)
Gets information about the promotion that will be available to a new user based on their
activity's location.
|
retrofit2.Call<Ride> |
getRideDetails(java.lang.String rideId)
Gets details about a specific ride.
|
retrofit2.Call<RideMap> |
getRideMap(java.lang.String rideId)
Get a map with a visual representation of a ride for tracking purposes.
|
retrofit2.Call<UserActivityPage> |
getUserActivity(java.lang.Integer offset,
java.lang.Integer limit)
Gets a limited amount of data about a user's lifetime activity.
|
retrofit2.Call<UserProfile> |
getUserProfile()
Gets information about the user that has authorized with the application.
|
retrofit2.Call<Ride> |
requestRide(RideRequestParameters rideRequestParameters)
Requests a ride on behalf of a user given their desired product, start, and end locations.
|
retrofit2.Call<Place> |
setPlace(java.lang.String placeId,
PlaceParameters placeParameters)
Sets information about a user's Place.
|
retrofit2.Call<java.lang.Void> |
updateRide(java.lang.String rideId,
RideUpdateParameters rideUpdateParameters)
Update an ongoing request's destination.
|
retrofit2.Call<java.lang.Void> |
updateSandboxProduct(java.lang.String productId,
SandboxProductRequestParameters sandboxProductRequestParameters)
Updates the product in the
sandbox environement to simulate the
possible responses the Request endpoint will return when requesting a particular product,
such as surge pricing and driver availability. |
retrofit2.Call<java.lang.Void> |
updateSandboxRide(java.lang.String rideId,
SandboxRideRequestParameters sandboxRideRequestParameters)
Updates the ride in the
sandbox environement to simulate the
possible states of a the Request. |
@GET(value="/v1.2/promotions") retrofit2.Call<Promotion> getPromotions(@Query(value="start_latitude") float startLatitude, @Query(value="start_longitude") float startLongitude, @Query(value="end_latitude") float endLatitude, @Query(value="end_longitude") float endLongitude)
startLatitude - Latitude component of start location.startLongitude - Longitude component of start location.endLatitude - Latitude component of end location.endLongitude - Longitude component of end location.Call@GET(value="/v1.2/history") retrofit2.Call<UserActivityPage> getUserActivity(@Nullable @Query(value="offset") java.lang.Integer offset, @Nullable @Query(value="limit") java.lang.Integer limit)
offset - Offset the list of returned results by this amount. Default is zero.limit - Number of items to retrieve. Default is 5, maximum is 50.Call@GET(value="/v1.2/me") retrofit2.Call<UserProfile> getUserProfile()
Call@GET(value="/v1.2/estimates/price") retrofit2.Call<PriceEstimatesResponse> getPriceEstimates(@Query(value="start_latitude") float startLatitude, @Query(value="start_longitude") float startLongitude, @Query(value="end_latitude") float endLatitude, @Query(value="end_longitude") float endLongitude)
startLatitude - Latitude component of start location.startLongitude - Longitude component of start location.endLatitude - Latitude component of end location.endLongitude - Longitude component of end location.Call@GET(value="/v1.2/estimates/time") retrofit2.Call<TimeEstimatesResponse> getPickupTimeEstimate(@Query(value="start_latitude") float startLatitude, @Query(value="start_longitude") float startLongitude, @Nullable @Query(value="product_id") java.lang.String productId)
startLatitude - Latitude component of start location.startLongitude - Longitude component of start location.productId - Unique identifier representing a specific product for a given latitude &
longitude.Call@GET(value="/v1.2/products") retrofit2.Call<ProductsResponse> getProducts(@Query(value="latitude") float latitude, @Query(value="longitude") float longitude)
latitude - Latitude component of location.longitude - Longitude component of location.Call@GET(value="/v1.2/products/{product_id}")
retrofit2.Call<Product> getProduct(@Path(value="product_id")
java.lang.String productId)
productId - The unique product ID to fetch information about.Call@DELETE(value="/v1.2/requests/{request_id}")
retrofit2.Call<java.lang.Void> cancelRide(@Path(value="request_id")
java.lang.String rideId)
rideId - Unique identifier representing a Request.Call@POST(value="/v1.2/requests") retrofit2.Call<Ride> requestRide(@Body RideRequestParameters rideRequestParameters)
rideRequestParameters - The ride request parameters.Call@GET(value="/v1.2/requests/current") retrofit2.Call<Ride> getCurrentRide()
Call@DELETE(value="/v1.2/requests/current") retrofit2.Call<java.lang.Void> cancelCurrentRide()
Call@PATCH(value="/v1.2/requests/{request_id}")
retrofit2.Call<java.lang.Void> updateRide(@Nonnull @Path(value="request_id")
java.lang.String rideId,
@Body
RideUpdateParameters rideUpdateParameters)
rideUpdateParameters - The ride request parameters.Call@GET(value="/v1.2/places/{place_id}")
retrofit2.Call<Place> getPlace(@Nonnull @Path(value="place_id")
java.lang.String placeId)
placeId - The identifier of a Place.Call@PUT(value="/v1.2/places/{place_id}")
retrofit2.Call<Place> setPlace(@Nonnull @Path(value="place_id")
java.lang.String placeId,
@Nonnull @Body
PlaceParameters placeParameters)
placeId - The identifier of a Place.placeParameters - The place parameters.Call@GET(value="/v1.2/requests/{request_id}")
retrofit2.Call<Ride> getRideDetails(@Nonnull @Path(value="request_id")
java.lang.String rideId)
rideId - The unique identifier for a ride.Call@POST(value="/v1.2/requests/estimate") retrofit2.Call<RideEstimate> estimateRide(@Body RideRequestParameters rideRequestParameters)
The request estimate endpoint allows a ride to be estimated given the desired product, start, and end locations. If the end location is not provided, only the pickup ETA and details of surge pricing information are provided. If the pickup ETA is null, there are no cars available, but an estimate may still be given to the user.
You can use this endpoint to determine if surge pricing is in effect. Do this before attempting to make a request so that you can preemptively have a user confirm surge by sending them to the surge_confirmation_href provided in the response.
rideRequestParameters - The ride request parameters.Call@GET(value="/v1.2/requests/{request_id}/map")
retrofit2.Call<RideMap> getRideMap(@Nonnull @Path(value="request_id")
java.lang.String rideId)
rideId - Unique identifier representing a ride.Call@GET(value="/v1.2/payment-methods") retrofit2.Call<PaymentMethodsResponse> getPaymentMethods()
PaymentMethods of user and their last used method ID.Call@PUT(value="/v1.2/sandbox/products/{product_id}")
retrofit2.Call<java.lang.Void> updateSandboxProduct(@Path(value="product_id")
java.lang.String productId,
@Body
SandboxProductRequestParameters sandboxProductRequestParameters)
sandbox environement to simulate the
possible responses the Request endpoint will return when requesting a particular product,
such as surge pricing and driver availability.
Will fail when called in SessionConfiguration.Environment#PRODUCTION.productId - The unique product ID to update.sandboxProductRequestParameters - The sandbox product request parameters.Call@PUT(value="/v1.2/sandbox/requests/{request_id}")
retrofit2.Call<java.lang.Void> updateSandboxRide(@Path(value="request_id")
java.lang.String rideId,
@Body
SandboxRideRequestParameters sandboxRideRequestParameters)
sandbox environement to simulate the
possible states of a the Request.
Will fail when called in SessionConfiguration.Environment#PRODUCTION.rideId - Unique identifier representing a Request.sandboxRideRequestParameters - The sandbox ride request parameters.Call