Interface CustomerCouponFacade

  • All Known Implementing Classes:
    DefaultCustomerCouponFacade

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

      • 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​(java.lang.String couponCode)
        Assigns customer coupon to the current customer
        Parameters:
        couponCode - the customer coupon code
        Returns:
        the assigning result
      • getCouponsData

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

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

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

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

        java.util.List<CustomerCouponData> getAssignedCustomerCoupons​(java.lang.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​(java.lang.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​(java.lang.String couponId)
        Gets customer coupon data by coupon id
        Parameters:
        couponId - the coupon id
        Returns:
        the CustomerCouponData
      • isCouponOwnedByCurrentUser

        boolean isCouponOwnedByCurrentUser​(java.lang.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​(java.lang.String code)
        Gets valid customer coupon data by coupon code
        Parameters:
        code - the coupon code
        Returns:
        the valid CustomerCouponData