-
- All Implemented Interfaces:
public interface IParkingApi
This interface represents the entry point to the parking service module. It exposes APIs for getting parking specific information.
-
-
Method Summary
Modifier and Type Method Description abstract Unit
init(SDKOptions sdkOptions, IParkingUserServiceProvider userServiceProvider, IParkingPaymentServiceProvider paymentProvider)
This method initializes or updates the parking service. abstract List<Brand>
getParkingBrands()
Searches for the available parking brands. abstract List<String>
getParkingStores(String startTime, String endTime, GeoLocation location)
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 List<String>
getParkingStoresForBrand(String brandId, String startTime, String endTime, GeoLocation location)
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 CommerceResponse<Quote>
getQuoteForParking(String parkingId, ParkingTime parkingTime)
Returns the quote for the parking place with the given id in the time interval between the given start time and end time. abstract CommerceResponse<String>
reserveParking(String parkingId, ParkingTime parkingTime, String quoteReference, PaymentRequest paymentRequest)
This method makes a parking reservation for the parking place with the given parking id (that was previously selected). abstract CommerceResponse<ParkingOrderInformation>
getLastParkingReservation()
This method will return information about the last parking reservation abstract CommerceResponse<List<ParkingOrderInformation>>
getParkingHistory(String sorting)
This method will return all the parking orders satisfying the given conditions abstract CommerceResponse<Status>
cancelParkingReservationById(String orderId)
This method will cancel the parking reservation with the given order id. -
-
Method Detail
-
init
abstract Unit init(SDKOptions sdkOptions, IParkingUserServiceProvider userServiceProvider, IParkingPaymentServiceProvider paymentProvider)
This method initializes or updates the parking service. Before interacting with the parking service, the client is responsible to call this method. In case that a switch to a different environment is desired, the method can be called again with the new endpoint and corresponding api keys and tokens.
- Parameters:
sdkOptions
- The component used to set the apiKey, apiSecret, endpoint, applicationID.userServiceProvider
- The user dependency required by parking service for proper running.paymentProvider
- The user dependency required by parking service for proper running.
-
getParkingBrands
abstract List<Brand> getParkingBrands()
Searches for the available parking brands.
-
getParkingStores
abstract List<String> getParkingStores(String startTime, String endTime, GeoLocation location)
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'location
- the coordinates around which the search should be done.
-
getParkingStoresForBrand
abstract List<String> getParkingStoresForBrand(String brandId, String startTime, String endTime, GeoLocation location)
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'location
- the coordinates around which the search should be done.
-
getQuoteForParking
abstract CommerceResponse<Quote> getQuoteForParking(String parkingId, ParkingTime parkingTime)
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.parkingTime
- An object containing the start time and end time of the parking together with the timezone
-
reserveParking
abstract CommerceResponse<String> reserveParking(String parkingId, ParkingTime parkingTime, String quoteReference, PaymentRequest paymentRequest)
This method makes a parking reservation for the parking place with the given parking id (that was previously selected).
- Parameters:
parkingId
- the id of the parking place for which the reservation should be done.parkingTime
- An object containing the start time and end time of the parking together with the timezonequoteReference
- The quote reference id retrieved from the getQuoteForParking callpaymentRequest
- An object containing the payment method
-
getLastParkingReservation
abstract CommerceResponse<ParkingOrderInformation> getLastParkingReservation()
This method will return information about the last parking reservation
-
getParkingHistory
abstract CommerceResponse<List<ParkingOrderInformation>> getParkingHistory(String sorting)
This method will return all the parking orders satisfying the given conditions
- Parameters:
sorting
- the way the results should be sorted; values in Sorting default is Sorting.DESCENDING
-
cancelParkingReservationById
abstract CommerceResponse<Status> cancelParkingReservationById(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.
-
-
-
-