-
- All Implemented Interfaces:
-
com.telenav.commerce.parkingservice.api.IParkingApi
public final class ParkingManager implements IParkingApi
This class represents the concrete implementation of the IParkingApi
-
-
Constructor Summary
Constructors Constructor Description ParkingManager(IParkingCommerceApi parkingCommerce)
-
Method Summary
Modifier and Type Method Description Unit
init(SDKOptions sdkOptions, IParkingUserServiceProvider userServiceProvider, IParkingPaymentServiceProvider paymentProvider)
List<Brand>
getParkingBrands()
Searches for the available parking brands. 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. 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. 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. 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). CommerceResponse<ParkingOrderInformation>
getLastParkingReservation()
This method will return information about the last parking reservation CommerceResponse<Status>
cancelParkingReservationById(String orderId)
This method will cancel the parking reservation with the given order id. CommerceResponse<List<ParkingOrderInformation>>
getParkingHistory(String sorting)
This method will return all the parking orders satisfying the given conditions -
-
Constructor Detail
-
ParkingManager
ParkingManager(IParkingCommerceApi parkingCommerce)
-
-
Method Detail
-
init
Unit init(SDKOptions sdkOptions, IParkingUserServiceProvider userServiceProvider, IParkingPaymentServiceProvider paymentProvider)
- Parameters:
sdkOptions
- The component used to set the apiKey, apiSecret, endpoint, applicationID.userServiceProvider
- The parking user service API implementation.paymentProvider
- The parking payment service API implementation.
-
getParkingBrands
List<Brand> getParkingBrands()
Searches for the available parking brands.
-
getParkingStores
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
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
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
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
CommerceResponse<ParkingOrderInformation> getLastParkingReservation()
This method will return information about the last parking reservation
-
cancelParkingReservationById
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.
-
getParkingHistory
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
-
-
-
-