Package 

Class FoodUpdateContext

  • All Implemented Interfaces:

    
    public final class FoodUpdateContext
    extends BaseUpdateContext
                        

    Represents the food related information needed for communication with VoiceKit. Communication between Commerce SDK and VoiceKit is done using json and this class should be a representation of the objects send out in the json.

    • Constructor Detail

      • FoodUpdateContext

        FoodUpdateContext(String merchantBookingId, Brand searchedBrand, List<Brand> availableBrands, FoodShoppingCart shoppingCart, List<FoodOrderInformation> foodOrders, FoodStore searchedStore, List<FoodStore> availableStores, FoodStore destinationList)
    • Method Detail

      • setSearchedBrand

         final Unit setSearchedBrand(@SerializedName(value = "brand") Brand searchedBrand)

        Searched brand

      • setShoppingCart

         final Unit setShoppingCart(@SerializedName(value = "shopping_cart") FoodShoppingCart shoppingCart)

        Shopping cart

      • setSearchedStore

         final Unit setSearchedStore(@SerializedName(value = "store") FoodStore searchedStore)

        Searched store

      • setAvailableStores

         final Unit setAvailableStores(@SerializedName(value = "stores") List<FoodStore> availableStores)

        Search results for Food

      • getDestinationList

         final FoodStore getDestinationList()

        Will be send out in case of a call or navigation action

      • getAction

         Action getAction()

        Represents an action used for communicating with VoiceKit component.

      • setAction

         Unit setAction(Action action)

        Represents an action used for communicating with VoiceKit component.

      • getIntent

         Intent getIntent()

        Intent will be received from VoiceKit when action is SHOW_SCREEN or UPDATE_CONTEXT

      • setIntent

         Unit setIntent(Intent intent)

        Intent will be received from VoiceKit when action is SHOW_SCREEN or UPDATE_CONTEXT

      • getStatus

         VoiceStatus getStatus()

        Represents the status from the Commerce Service.

      • getPageIndex

         Integer getPageIndex()

        Represents the current page index when there are search results.

      • setPageIndex

         Unit setPageIndex(@SerializedName(value = "page_index") Integer pageIndex)

        Represents the current page index when there are search results.

      • setIsFirstResume

         Unit setIsFirstResume(@SerializedName(value = "is_first_time_resume") Boolean isFirstResume)

        Indicates if is a first voice resume operation.

      • setResumeTimeInSeconds

         Unit setResumeTimeInSeconds(@SerializedName(value = "resume_time_in_seconds") Integer resumeTimeInSeconds)

        Indicates the time passed from the last user interaction with the system.

      • setShoppingSessionId

         Unit setShoppingSessionId(@SerializedName(value = "shopping_session_id") String shoppingSessionId)

        Current shopping session id

      • getSearchedLocation

         SearchLocation getSearchedLocation()

        Searched location. This field will contain the entry information about the search location. E.g 'find parking near Post Street' will have a searchLocation with query 'Post Street'

      • setSearchedLocation

         Unit setSearchedLocation(@SerializedName(value = "search_location") SearchLocation searchedLocation)

        Searched location. This field will contain the entry information about the search location. E.g 'find parking near Post Street' will have a searchLocation with query 'Post Street'

      • getLocations

         List<SearchLocation> getLocations()

        List of locations when a search by address was done. E.g "find parking/order food near Post Street". Multiple Post Street locations are received.

      • setLocations

         Unit setLocations(@SerializedName(value = "search_locations") List<SearchLocation> locations)

        List of locations when a search by address was done. E.g "find parking/order food near Post Street". Multiple Post Street locations are received.

      • toString

         String toString()

        Returns a string representation of the object.