-
- All Implemented Interfaces:
public interface IParkingCommerceApi
This interface represents the entry point to Commerce Service regrading the parking flow. It exposes APIs needed for getting parking specific information.
-
-
Method Summary
Modifier and Type Method Description abstract Unit
setConfiguration(SdkConfiguration configuration)
Updates the IHttpApi instance with the given configuration to be used in the communication with commerce service. abstract List<Brand>
getParkingBrands()
Returns a list of brands available for parking. abstract List<ParkingStore>
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 ParkingStore. abstract List<ParkingStore>
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 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<Status>
cancelParkingReservationById(String orderId)
This method will cancel the parking reservation with the given order id. abstract CommerceResponse<StatusResponse>
emptyCart()
Clears the current shopping cart abstract CommerceResponse<StatusResponse>
addParkingReservation(String parkingId, ParkingTime parkingTime, String quoteReference)
Adds a parking reservation to your shopping cart abstract CommerceResponse<ParkingOrderResponse>
placeOrder(@Body() PaymentRequest paymentRequest)
Place the order that was previously added in the shopping cart abstract CommerceResponse<List<ParkingOrderInformation>>
getParkingHistory(String sorting, Integer limit)
This method will return all the parking orders satisfying the given conditions -
-
Method Detail
-
setConfiguration
abstract Unit setConfiguration(SdkConfiguration configuration)
Updates the IHttpApi instance with the given configuration to be used in the communication with commerce service.
- Parameters:
configuration
- to be used
-
getParkingBrands
abstract List<Brand> getParkingBrands()
Returns a list of brands available for parking.
-
getParkingStores
abstract List<ParkingStore> 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 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<ParkingStore> 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 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
- contains the enter date and time for parking reservation as destination timezone, in ISO 8601 format: 'yyyy-mm-ddThh:mm:ss' and the end date and time for parking reservation as destination timezone, in ISO 8601 format: 'yyyy-mm-ddThh:mm:ss'
-
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.
-
emptyCart
abstract CommerceResponse<StatusResponse> emptyCart()
Clears the current shopping cart
-
addParkingReservation
abstract CommerceResponse<StatusResponse> addParkingReservation(String parkingId, ParkingTime parkingTime, String quoteReference)
Adds a parking reservation to your shopping cart
- Parameters:
parkingId
- The id of the parking where you want to book a parking spotparkingTime
- An object containing the start time and end time of the parking together with the timezonequoteReference
- The quote reference id retrieved from the getQuoteForParking call
-
placeOrder
abstract CommerceResponse<ParkingOrderResponse> placeOrder(@Body() PaymentRequest paymentRequest)
Place the order that was previously added in the shopping cart
- Parameters:
paymentRequest
- An object containing the payment method
-
getParkingHistory
abstract CommerceResponse<List<ParkingOrderInformation>> getParkingHistory(String sorting, Integer limit)
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
-
-
-
-