Interface CustomerCouponService

All Superinterfaces:
CouponService
All Known Implementing Classes:
DefaultCustomerCouponService

public interface CustomerCouponService extends CouponService
Deals with customer coupon related Models using existing DAOs
  • Method Details

    • getCustomerCouponsForCustomer

      SearchPageData<CustomerCouponModel> getCustomerCouponsForCustomer(CustomerModel customer, PageableData pageableData)
      Gets paginated customer coupon models for the customer by pageableData
      Parameters:
      customer - the customer model
      pageableData - the data used for pagination
      Returns:
      the paginated customer coupon models
    • getPromotionSourceRuleForCouponCode

      List<PromotionSourceRuleModel> getPromotionSourceRuleForCouponCode(String couponCode)
      Gets promotion source rule by coupon code
      Parameters:
      couponCode - the coupon code
      Returns:
      the list of PromotionSourceRuleModel
    • assignCouponToCustomer

      void assignCouponToCustomer(String couponCode, CustomerModel customer)
      Assigns the customer coupon to the current customer
      Parameters:
      couponCode - the coupon code
      customer - the customer model
    • getPromotionSourceRulesForProduct

      List<PromotionSourceRuleModel> getPromotionSourceRulesForProduct(String productCode)
      Gets promotion source rules by product code
      Parameters:
      productCode - the product code
      Returns:
      the list of PromotionSourceRuleModel
    • getExclPromotionSourceRulesForProduct

      List<PromotionSourceRuleModel> getExclPromotionSourceRulesForProduct(String productCode)
      Gets excluded promotion source rules by product code
      Parameters:
      productCode - the product code
      Returns:
      the list of PromotionSourceRuleModel
    • getPromotionSourceRulesForCategory

      List<PromotionSourceRuleModel> getPromotionSourceRulesForCategory(String categoryCode)
      Gets promotion source rules by category
      Parameters:
      categoryCode - the category code
      Returns:
      the list of PromotionSourceRuleModel
    • getExclPromotionSourceRulesForCategory

      List<PromotionSourceRuleModel> getExclPromotionSourceRulesForCategory(String categoryCode)
      Gets excluded promotion source rules by category
      Parameters:
      categoryCode - the category code
      Returns:
      the list of PromotionSourceRuleModel
    • getCouponCodeForPromotionSourceRule

      List<String> getCouponCodeForPromotionSourceRule(String code)
      Gets customer coupon codes by promotion source rule
      Parameters:
      code - the promotion source rule code
      Returns:
      the list of customer coupon codes
    • countProductOrCategoryForPromotionSourceRule

      int countProductOrCategoryForPromotionSourceRule(String code)
      Counts the number of products and categories mapped with promotion source rule
      Parameters:
      code - the promotion source rule code
      Returns:
      the total number of products and categories mapped with promotion source rule
    • getValidCustomerCouponByCode

      Optional<CustomerCouponModel> getValidCustomerCouponByCode(String couponCode)
      Gets valid customer coupon models by coupon code
      Parameters:
      couponCode - the coupon code
      Returns:
      the optional of CustomerCouponModel
    • saveCouponNotification

      Optional<CouponNotificationModel> saveCouponNotification(String couponCode)
      Saves customer coupon notification
      Parameters:
      couponCode - the coupon code
      Returns:
      the optional of CouponNotificationModel
    • removeCouponNotificationByCode

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

      boolean getCouponNotificationStatus(String couponCode)
      Gets coupon notification status by coupon code
      Parameters:
      couponCode - the coupon code
      Returns:
      true if the current customer has subscribed to the coupon notification and false otherwise
    • removeCouponForCustomer

      void removeCouponForCustomer(String couponCode, CustomerModel customer)
      Removes customer coupon for the customer
      Parameters:
      couponCode - the coupon code
      customer - the customer model
    • getEffectiveCustomerCouponsForCustomer

      List<CustomerCouponModel> getEffectiveCustomerCouponsForCustomer(CustomerModel customer)
      Gets effective customer coupons of the customer
      Parameters:
      customer - the customer model
      Returns:
      the list of CustomerCouponModel
    • getAssignableCustomerCoupons

      List<CustomerCouponModel> getAssignableCustomerCoupons(CustomerModel customer, String text)
      Gets assignable customer coupons
      Parameters:
      customer - the customer model
      text - the text used for searching assignable customer coupons
      Returns:
      the list of CustomerCouponModel
    • getAssignedCustomerCouponsForCustomer

      List<CustomerCouponModel> getAssignedCustomerCouponsForCustomer(CustomerModel customer, String text)
      Gets assigned customer coupons
      Parameters:
      customer - the customer model
      text - the text used for searching assigned customer coupons
      Returns:
      the list of CustomerCouponModel
    • getCustomerCouponForCode

      Optional<CustomerCouponModel> getCustomerCouponForCode(String couponCode)
      Gets customer coupon models by coupon code
      Parameters:
      couponCode - the coupon code
      Returns:
      the optional of CustomerCouponModel, single and multi coupon will return null
    • getPaginatedCouponsForCustomer

      SearchPageData<CustomerCouponModel> getPaginatedCouponsForCustomer(CustomerModel customer, SearchPageData searchPageData)
      Gets paginated customer coupon data by searchPageData
      Parameters:
      customer - the customer model
      searchPageData - the data used for pagination
      Returns:
      the paginated customer coupon models
    • getCouponNotificationsForCustomer

      List<CouponNotificationModel> getCouponNotificationsForCustomer(CustomerModel customer)
      Gets coupon notifications for the customer
      Parameters:
      customer - the customer model
      Returns:
      the list of CouponNotificationModel
    • getPromotionSourcesRuleForProductCategories

      List<PromotionSourceRuleModel> getPromotionSourcesRuleForProductCategories(ProductModel product)
      Gets promotionSourceRule for categories of product
      Parameters:
      product - the product model
      Returns:
      the list of PromotionSourceRuleModel