-
- All Implemented Interfaces:
public interface IParkingRetrofitServiceApi
This interface represents the contract for the Parking Retrofit Service.
-
-
Method Summary
Modifier and Type Method Description abstract Call<List<Brand>>
getParkingBrands()
Searches for the available parking brands. abstract Response<CommerceServiceResponse<StatusResponse>>
addParkingReservation(@Body() AddReservationRequest addReservationRequest)
Adds a parking reservation to your shopping cart abstract Call<List<String>>
getParkingStores(@Query(value = "start_time") String startTime, @Query(value = "end_time") String endTime, @Query(value = "lat") Double latitude, @Query(value = "lon") Double longitude)
Searches for a parking place based on the given start time, end time and location and returns a list of com.telenav.commerce.models.parking.ParkingStore. abstract Response<CommerceServiceResponse<ParkingOrderResponse>>
placeOrder(@Body() PaymentRequest paymentRequest)
Place the order that was previously added in the shopping cart abstract Call<List<String>>
getParkingStoresForBrand(@Path(value = "brandId") String brandId, @Query(value = "start_time") String startTime, @Query(value = "end_time") String endTime, @Query(value = "lat") Double latitude, @Query(value = "lon") Double longitude)
Searches for a parking place based on the given brand id, start time, end time and location and returns a list of com.telenav.commerce.models.parking.ParkingStore. abstract Response<CommerceServiceResponse<Quote>>
getQuoteForParking(@Path(value = "store_id") String parkingId, @Body() GetQuoteRequest quoteRequest)
Returns the quote for the parking place with the given id in the time interval between the given start time and end time. abstract Response<CommerceServiceResponse<Object>>
emptyCart()
Clears the current shopping cart abstract Unit
selectParking(@Path(value = "bookingId") String parkingId)
This method selects the parking place with the given parking id, meaning that it will be ready to be reservable. abstract Response<CommerceServiceResponse<Status>>
cancelParkingReservationById(@Path(value = "order_id") String orderId)
This method will cancel the parking reservation with the given order id. abstract Unit
firstCheckout()
abstract Unit
secondCheckout()
abstract Response<CommerceServiceResponse<List<ParkingOrderInformation>>>
getParkingHistory(@Query(value = "sorting") String sorting, @Query(value = "limit") Integer limit)
This method will return all the parking orders satisfying the given conditions -
-
Method Detail
-
getParkingBrands
@GET(value = "/commerce/v3/categories/parking/brands") abstract Call<List<Brand>> getParkingBrands()
Searches for the available parking brands.
-
addParkingReservation
@POST(value = "/commerce/v3/carts/items")@Headers(value = {"Content-Type: application/json", "Content-Encoding: gzip"}) abstract Response<CommerceServiceResponse<StatusResponse>> addParkingReservation(@Body() AddReservationRequest addReservationRequest)
Adds a parking reservation to your shopping cart
- Parameters:
addReservationRequest
- Contains all the information required for adding the reservation to your shopping cart
-
getParkingStores
@GET(value = "/commerce/v3/categories/parking/stores") abstract Call<List<String>> getParkingStores(@Query(value = "start_time") String startTime, @Query(value = "end_time") String endTime, @Query(value = "lat") Double latitude, @Query(value = "lon") Double longitude)
Searches for a parking place based on the given start time, end time and location and returns a list of com.telenav.commerce.models.parking.ParkingStore.
- Parameters:
startTime
- the enter date and time for parking reservation as destination timezone, in ISO 8601 format: 'yyyy-mm-ddThh:mm:ss'endTime
- the end date and time for parking reservation as destination timezone, in ISO 8601 format: 'yyyy-mm-ddThh:mm:ss'latitude
- the latitude of the location around which the search should be done.longitude
- the longitude of the location around which the search should be done.
-
placeOrder
@POST(value = "/commerce/v3/orders/place")@Headers(value = {"Content-Type: application/json", "Content-Encoding: gzip"}) abstract Response<CommerceServiceResponse<ParkingOrderResponse>> placeOrder(@Body() PaymentRequest paymentRequest)
Place the order that was previously added in the shopping cart
- Parameters:
paymentRequest
- An object containing the payment method
-
getParkingStoresForBrand
@GET(value = "/commerce/v3/categories/parking/brands/{brandId}/stores") abstract Call<List<String>> getParkingStoresForBrand(@Path(value = "brandId") String brandId, @Query(value = "start_time") String startTime, @Query(value = "end_time") String endTime, @Query(value = "lat") Double latitude, @Query(value = "lon") Double longitude)
Searches for a parking place based on the given brand id, start time, end time and location and returns a list of com.telenav.commerce.models.parking.ParkingStore.
- Parameters:
brandId
- the id of the Brand for which the search should be done.startTime
- the enter date and time for parking reservation as destination timezone, in ISO 8601 format: 'yyyy-mm-ddThh:mm:ss'endTime
- the end date and time for parking reservation as destination timezone, in ISO 8601 format: 'yyyy-mm-ddThh:mm:ss'latitude
- the latitude of the location around which the search should be done.longitude
- the longitude of the location around which the search should be done.
-
getQuoteForParking
@POST(value = "/commerce/v3/categories/parking/stores/{store_id}/quote")@Headers(value = {"Content-Type: application/json", "Content-Encoding: gzip"}) abstract Response<CommerceServiceResponse<Quote>> getQuoteForParking(@Path(value = "store_id") String parkingId, @Body() GetQuoteRequest quoteRequest)
Returns the quote for the parking place with the given id in the time interval between the given start time and end time.
- Parameters:
parkingId
- the id of the parking place for which the price info should be returned.quoteRequest
- object holding the request payload; it holds the start time and end time for the parking spot of interest
-
emptyCart
@DELETE(value = "/commerce/v3/carts") abstract Response<CommerceServiceResponse<Object>> emptyCart()
Clears the current shopping cart
-
selectParking
@POST(value = "/commerce/v3/parking/booking/{bookingId}/confirmation")@Headers(value = {"Content-Type: application/json", "Content-Encoding: gzip"}) abstract Unit selectParking(@Path(value = "bookingId") String parkingId)
This method selects the parking place with the given parking id, meaning that it will be ready to be reservable.
- Parameters:
parkingId
- the id of the parking place for which the selection should be done.
-
cancelParkingReservationById
@POST(value = "/commerce/v3/orders/{order_id}/cancel")@Headers(value = {"Content-Type: application/json", "Content-Encoding: gzip"}) abstract Response<CommerceServiceResponse<Status>> cancelParkingReservationById(@Path(value = "order_id") String orderId)
This method will cancel the parking reservation with the given order id.
- Parameters:
orderId
- the id of the parking reservation that should be canceled.
-
firstCheckout
abstract Unit firstCheckout()
-
secondCheckout
abstract Unit secondCheckout()
-
getParkingHistory
@GET(value = "/commerce/v3/orders/list?category=parking") abstract Response<CommerceServiceResponse<List<ParkingOrderInformation>>> getParkingHistory(@Query(value = "sorting") String sorting, @Query(value = "limit") Integer limit)
This method will return all the parking orders satisfying the given conditions
- Parameters:
sorting
- the way the results should be sorted; Orders are sorted by the datetime of creation, values in Sorting; default is Sorting.DESCENDINGlimit
- the number of results by specifying this attribute.
-
-
-
-