Package 

Interface IFoodCommerceApi

  • All Implemented Interfaces:

    
    public interface IFoodCommerceApi
    
                        

    This interface represents the entry point to Commerce Service in regards of food flow. It exposes APIs needed for getting food specific information.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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 CommerceResponse<List<Brand>> getBrands() Returns a list of brands available for food.
      abstract CommerceResponse<List<FoodStore>> getFoodStoresAlongRoute(GeoLocation location, String brandId, List<GeoLocation> routePoints) Returns a list of available food stores around the given location, along the provided route, and for the given brand.
      abstract CommerceResponse<FoodStore> getDefaultStore(GeoLocation location, String brandId, String merchantKey, List<GeoLocation> routePoints) Returns a store that matches the default store alg described belowIf there is no previous order history with the merchant(brand) If free drive If there is a store within 'food search radius' and store if open -> Select nearest store.
      abstract CommerceResponse<List<FoodStore>> getFoodStores(GeoLocation location, String brandId) Returns a list of available food stores around the given location and for the given brand.
      abstract CommerceResponse<List<FoodOrderInformation>> getFoodHistory(Boolean onlyActive) Retrieves user's food orders.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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
      • getBrands

         abstract CommerceResponse<List<Brand>> getBrands()

        Returns a list of brands available for food.

      • getFoodStoresAlongRoute

         abstract CommerceResponse<List<FoodStore>> getFoodStoresAlongRoute(GeoLocation location, String brandId, List<GeoLocation> routePoints)

        Returns a list of available food stores around the given location, along the provided route, and for the given brand.

        Parameters:
        location - the coordinates around which the search should be done.
        brandId - the id of the Brand for which the search should be done.
        routePoints - list of route GeoLocation objects representing the route points
      • getDefaultStore

         abstract CommerceResponse<FoodStore> getDefaultStore(GeoLocation location, String brandId, String merchantKey, List<GeoLocation> routePoints)

        Returns a store that matches the default store alg described below

        If there is no previous order history with the merchant(brand) If free drive If there is a store within 'food search radius' and store if open -> Select nearest store. If active navigation if there is a store within 'X' minutes (X <= 10) of detour time from current route; store is open. Driving time from CVP and store is less than 'Y' mins (Y = 60) -> select the store that is closest (driving time) to the user and has a detour of less X mins x and y should be configurable without a client change (no new deploy on the cloud)

        If there is previous order history with the merchant if Free drive select the nearest open store from all available order history within 'search radius' if no order history store is open and available within the search radius -> select the nearest open store If active navigation - use the same logic as no order history.

        Parameters:
        location - the coordinates around which the search should be done.
        brandId - the id of the Brand for which the search should be done.
        routePoints - list of route GeoLocation objects representing the route points
      • getFoodStores

         abstract CommerceResponse<List<FoodStore>> getFoodStores(GeoLocation location, String brandId)

        Returns a list of available food stores around the given location and for the given brand.

        Parameters:
        location - the coordinates around which the search should be done.
        brandId - the id of the Brand for which the search should be done.
      • getFoodHistory

         abstract CommerceResponse<List<FoodOrderInformation>> getFoodHistory(Boolean onlyActive)

        Retrieves user's food orders.

        Parameters:
        onlyActive - set if request should return only active items