Interface AccommodationCommerceCartService

All Known Implementing Classes:
DefaultAccommodationCommerceCartService

public interface AccommodationCommerceCartService
This service provides functionality of adding, removing and modifying order entries specific to accommodations.
  • Method Details

    • populateAccommodationDetailsOnRoomRateEntry

      void populateAccommodationDetailsOnRoomRateEntry(int entryNumber, List<Date> dates)
      Populates entry type, dates and amend status on a accommodationOrderEntryInfo attribute of a given entry
      Parameters:
      entryNumber - the entry number
      dates - the dates
    • createOrderEntryGroup

      void createOrderEntryGroup(List<Integer> entryNumbers, Date checkInDate, Date checkOutDate, String accOffCode, String accCode, String ratePlanCode, int refNumber)
      Creates order entry group which will hold a set of data related to one of the roomStays. It will also be linked to all order entries related to this roomStay.
      Parameters:
      entryNumbers - the entry numbers
      checkInDate - the check in date
      checkOutDate - the check out date
      accOffCode - the acc off code
      accCode - the acc code
      ratePlanCode - the rate plan code
      refNumber - the ref number
    • amendOrderEntryGroup

      boolean amendOrderEntryGroup(AccommodationOrderEntryGroupModel accommodationOrderEntryGroup, List<Integer> entryNumbers, String paymentType)
      Link accommodationOrderEntryGroup to new Entries of the amended Order based on the paymentType and the paymentMethod used during original method
      Parameters:
      accommodationOrderEntryGroup - the accommodation order entry group
      entryNumbers - the entry numbers
      paymentType - then type of transaction to create
      Returns:
      true/false
    • getNewAccommodationOrderEntryGroups

      List<AccommodationOrderEntryGroupModel> getNewAccommodationOrderEntryGroups(String accommodationOfferingCode, String accommodationCode, String ratePlanCode)
      Retrieves a list of AccommodationOrderEntryGroup from current session cart which match given accommodationOfferingCode, accommodationCode and ratePlan set.
      Parameters:
      accommodationOfferingCode - the accommodation offering code
      accommodationCode - the accommodation code
      ratePlanCode - the rate plan code
      Returns:
      list of AccommodationOrderEntryGroup
    • getMaxRoomStayRefNumber

      int getMaxRoomStayRefNumber()
      Identifies the maximum roomStayRefNumber based on the AccommodationOrderEntryGroups that are currently in the cart.
      Returns:
      maxRoomStayRefNumber max room stay ref number
    • removeAccommodationOrderEntryGroups

      @Deprecated(since="2003", forRemoval=true) void removeAccommodationOrderEntryGroups(List<AccommodationOrderEntryGroupModel> accommodationOrderEntryGroups, int numberToRemove)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 2003
      Removes a number of given AccommodationOrderEntryGroups from cart and all entries associated to them. It then normalises the roomStayRefNumbers not to lose track of them.
      Parameters:
      accommodationOrderEntryGroups - - accommodationOrderEntryGroups currently in cart
      numberToRemove - - specifies how many AccommodationOrderEntryGroups should be removed.
    • removeAccommodations

      CommerceCartModification removeAccommodations(List<AccommodationOrderEntryGroupModel> accommodationOrderEntryGroups, int numberToRemove)
      Removes a number of given AccommodationOrderEntryGroups from cart and all entries associated to them. It then normalises the roomStayRefNumbers not to lose track of them.
      Parameters:
      accommodationOrderEntryGroups - - accommodationOrderEntryGroups currently in cart
      numberToRemove -
      Returns:
      CommerceCartModification
    • rollbackAccommodationEntries

      void rollbackAccommodationEntries(String accommodationCode, String accommodationOfferingCode, String ratePlanCode)
      Removes the accommodationOfferingEntries that were associated with the option which was affected during add to cart.
      Parameters:
      accommodationCode - the accommodation code
      accommodationOfferingCode - the accommodation offering code
      ratePlanCode - the rate plan code
    • cleanupCartBeforeAddition

      void cleanupCartBeforeAddition(String accommodationOfferingCode, String checkInDateTime, String checkOutDateTime)
      Checks if the accommodationOfferingCode matches the one that is currently in the cart. If not, all AccommodationOrderEntryGroups should be removed from cart because multi accommodation offering booking is not supported
      Parameters:
      accommodationOfferingCode - the accommodation offering code
      checkInDateTime - the check in date time
      checkOutDateTime - the check out date time
    • validateCart

      boolean validateCart(String accommodationOfferingCode, String checkInDateTime, String checkOutDateTime, List<AccommodationOrderEntryGroupModel> entryGroups)
      Parameters:
      accommodationOfferingCode - accommodation offering code
      checkInDateTime - check in date
      checkOutDateTime - check out date
      entryGroups - accommodation order entry groups
      Returns:
      true if cart is valid
    • isAccommodationExistInCart

      boolean isAccommodationExistInCart(String accommodationOfferingCode, Date checkInDate, Date checkOutDate, List<AccommodationOrderEntryGroupModel> entryGroups)
      Check whether accommodation exist in the cart.
      Parameters:
      accommodationOfferingCode - accommodation offering code
      checkInDate - check in date
      checkOutDate - check out date
      entryGroups - accommodation order entry groups
      Returns:
      true if accommodation exist in cart
    • emptyCart

      void emptyCart()
      Removes all the entries in the cart.
    • getNumberOfEntryGroupsInCart

      int getNumberOfEntryGroupsInCart()
      Returns a number of AccommodationOrderEntryGroups that are currently in the cart.
      Returns:
      number of entry groups in cart
    • removeAccommodationOrderEntryGroup

      Boolean removeAccommodationOrderEntryGroup(int roomStayReference)
      Removes accommodation order entry group and entries associated to it from the cart
      Parameters:
      roomStayReference - the room stay reference
      Returns:
      boolean
    • getCurrentAccommodationOffering

      String getCurrentAccommodationOffering()
      Retrieves AccommodationOffering that is currently in the cart
      Returns:
      current accommodation offering
    • removeRoomStay

      void removeRoomStay(Integer roomStayRefNumber)
      Removes accommodation order entry and related entries from the cart without room stay ref normalisation
      Parameters:
      roomStayRefNumber -
    • isNewRoomInCart

      boolean isNewRoomInCart()
      Check whether new room is added into the cart.
      Returns:
    • getEntriesForProductAndAccommodation

      List<CartEntryModel> getEntriesForProductAndAccommodation(CartModel cartModel, ProductModel product, CartEntryModel cartEntryModel)
      Retrieves a list of CartEntryModel that matches the provided ProductModel and AccommodationModel in the CartModel
      Parameters:
      cartModel -
      product -
      cartEntryModel -
      Returns:
      current accommodation offering
    • getPaymentTypeForChangeDates

      String getPaymentTypeForChangeDates(AccommodationOrderEntryGroupModel accommodationOrderEntryGroup, List<Integer> entryNumbers)
      Identifies which payment type will occur on changing dates
      Parameters:
      entryNumbers -
      Returns: