Interface CustomerCouponFacade

All Known Implementing Classes:
DefaultCustomerCouponFacade

public interface CustomerCouponFacade
Deals with customer coupon related DTOs using existing service
  • Method Details

    • getPagedCouponsData

      SearchPageData<CustomerCouponData> getPagedCouponsData(PageableData pageableData)
      Gets paginated customer coupon data by pageableData
      Parameters:
      pageableData - the data used for pagination
      Returns:
      the paginated customer coupon data
    • grantCouponAccessForCurrentUser

      AssignCouponResult grantCouponAccessForCurrentUser(String couponCode)
      Assigns customer coupon to the current customer
      Parameters:
      couponCode - the customer coupon code
      Returns:
      the assigning result
    • getCouponsData

      List<CustomerCouponData> getCouponsData()
      Gets customer coupon data of the current customer
      Returns:
      the list of CustomerCouponData
    • saveCouponNotification

      CustomerCouponNotificationData saveCouponNotification(String couponCode)
      Saves customer coupon notification
      Parameters:
      couponCode - the coupon code
      Returns:
      the customer coupon notification data
    • removeCouponNotificationByCode

      void removeCouponNotificationByCode(String couponCode)
      Removes customer coupon notification
      Parameters:
      couponCode - the coupon code
    • getAssignableCustomerCoupons

      List<CustomerCouponData> getAssignableCustomerCoupons(String text)
      Gets assignable customer coupon data
      Parameters:
      text - the text used for searching assignable customer coupons
      Returns:
      the list of search results
    • getAssignedCustomerCoupons

      List<CustomerCouponData> getAssignedCustomerCoupons(String text)
      Gets assigned customer coupon data
      Parameters:
      text - the text used for searching assigned customer coupons
      Returns:
      the list of search results
    • releaseCoupon

      void releaseCoupon(String couponCode) throws VoucherOperationException
      Releases the specific customer coupon of the current customer
      Parameters:
      couponCode - the coupon code
      Throws:
      VoucherOperationException - throw when release voucher failed
    • getCustomerCouponForCode

      CustomerCouponData getCustomerCouponForCode(String couponId)
      Gets customer coupon data by coupon id
      Parameters:
      couponId - the coupon id
      Returns:
      the CustomerCouponData
    • isCouponOwnedByCurrentUser

      boolean isCouponOwnedByCurrentUser(String couponCode)
      Checks if the specific customer coupon is owned by the current customer
      Parameters:
      couponCode - the coupon code
      Returns:
      true if the coupon is owned by the current customer and false otherwise
    • getPaginatedCoupons

      CustomerCouponSearchPageData getPaginatedCoupons(SearchPageData searchPageData)
      Gets paginated customer coupon data by searchPageData
      Parameters:
      searchPageData - the data used for pagination
      Returns:
      the paginated customer coupon data
    • getValidCouponForCode

      CustomerCouponData getValidCouponForCode(String code)
      Gets valid customer coupon data by coupon code
      Parameters:
      code - the coupon code
      Returns:
      the valid CustomerCouponData