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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
assignCouponToCustomer(java.lang.String couponCode, CustomerModel customer)
Assigns the customer coupon to the current customerint
countProductOrCategoryForPromotionSourceRule(java.lang.String code)
Counts the number of products and categories mapped with promotion source rulejava.util.List<CustomerCouponModel>
getAssignableCustomerCoupons(CustomerModel customer, java.lang.String text)
Gets assignable customer couponsjava.util.List<CustomerCouponModel>
getAssignedCustomerCouponsForCustomer(CustomerModel customer, java.lang.String text)
Gets assigned customer couponsjava.util.List<java.lang.String>
getCouponCodeForPromotionSourceRule(java.lang.String code)
Gets customer coupon codes by promotion source rulejava.util.List<CouponNotificationModel>
getCouponNotificationsForCustomer(CustomerModel customer)
Gets coupon notifications for the customerboolean
getCouponNotificationStatus(java.lang.String couponCode)
Gets coupon notification status by coupon codejava.util.Optional<CustomerCouponModel>
getCustomerCouponForCode(java.lang.String couponCode)
Gets customer coupon models by coupon codeSearchPageData<CustomerCouponModel>
getCustomerCouponsForCustomer(CustomerModel customer, PageableData pageableData)
Gets paginated customer coupon models for the customer by pageableDatajava.util.List<CustomerCouponModel>
getEffectiveCustomerCouponsForCustomer(CustomerModel customer)
Gets effective customer coupons of the customerjava.util.List<PromotionSourceRuleModel>
getExclPromotionSourceRulesForCategory(java.lang.String categoryCode)
Gets excluded promotion source rules by categoryjava.util.List<PromotionSourceRuleModel>
getExclPromotionSourceRulesForProduct(java.lang.String productCode)
Gets excluded promotion source rules by product codeSearchPageData<CustomerCouponModel>
getPaginatedCouponsForCustomer(CustomerModel customer, SearchPageData searchPageData)
Gets paginated customer coupon data by searchPageDatajava.util.List<PromotionSourceRuleModel>
getPromotionSourceRuleForCouponCode(java.lang.String couponCode)
Gets promotion source rule by coupon codejava.util.List<PromotionSourceRuleModel>
getPromotionSourceRulesForCategory(java.lang.String categoryCode)
Gets promotion source rules by categoryjava.util.List<PromotionSourceRuleModel>
getPromotionSourceRulesForProduct(java.lang.String productCode)
Gets promotion source rules by product codejava.util.List<PromotionSourceRuleModel>
getPromotionSourcesRuleForProductCategories(ProductModel product)
Gets promotionSourceRule for categories of productjava.util.Optional<CustomerCouponModel>
getValidCustomerCouponByCode(java.lang.String couponCode)
Gets valid customer coupon models by coupon codevoid
removeCouponForCustomer(java.lang.String couponCode, CustomerModel customer)
Removes customer coupon for the customervoid
removeCouponNotificationByCode(java.lang.String couponCode)
Removes customer coupon notificationjava.util.Optional<CouponNotificationModel>
saveCouponNotification(java.lang.String couponCode)
Saves customer coupon notification-
Methods inherited from interface de.hybris.platform.couponservices.services.CouponService
getCouponForCode, getValidatedCouponForCode, redeemCoupon, redeemCoupon, releaseCouponCode, validateCouponCode, verifyCouponCode
-
-
-
-
Method Detail
-
getCustomerCouponsForCustomer
SearchPageData<CustomerCouponModel> getCustomerCouponsForCustomer(CustomerModel customer, PageableData pageableData)
Gets paginated customer coupon models for the customer by pageableData- Parameters:
customer
- the customer modelpageableData
- the data used for pagination- Returns:
- the paginated customer coupon models
-
getPromotionSourceRuleForCouponCode
java.util.List<PromotionSourceRuleModel> getPromotionSourceRuleForCouponCode(java.lang.String couponCode)
Gets promotion source rule by coupon code- Parameters:
couponCode
- the coupon code- Returns:
- the list of PromotionSourceRuleModel
-
assignCouponToCustomer
void assignCouponToCustomer(java.lang.String couponCode, CustomerModel customer)
Assigns the customer coupon to the current customer- Parameters:
couponCode
- the coupon codecustomer
- the customer model
-
getPromotionSourceRulesForProduct
java.util.List<PromotionSourceRuleModel> getPromotionSourceRulesForProduct(java.lang.String productCode)
Gets promotion source rules by product code- Parameters:
productCode
- the product code- Returns:
- the list of PromotionSourceRuleModel
-
getExclPromotionSourceRulesForProduct
java.util.List<PromotionSourceRuleModel> getExclPromotionSourceRulesForProduct(java.lang.String productCode)
Gets excluded promotion source rules by product code- Parameters:
productCode
- the product code- Returns:
- the list of PromotionSourceRuleModel
-
getPromotionSourceRulesForCategory
java.util.List<PromotionSourceRuleModel> getPromotionSourceRulesForCategory(java.lang.String categoryCode)
Gets promotion source rules by category- Parameters:
categoryCode
- the category code- Returns:
- the list of PromotionSourceRuleModel
-
getExclPromotionSourceRulesForCategory
java.util.List<PromotionSourceRuleModel> getExclPromotionSourceRulesForCategory(java.lang.String categoryCode)
Gets excluded promotion source rules by category- Parameters:
categoryCode
- the category code- Returns:
- the list of PromotionSourceRuleModel
-
getCouponCodeForPromotionSourceRule
java.util.List<java.lang.String> getCouponCodeForPromotionSourceRule(java.lang.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(java.lang.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
java.util.Optional<CustomerCouponModel> getValidCustomerCouponByCode(java.lang.String couponCode)
Gets valid customer coupon models by coupon code- Parameters:
couponCode
- the coupon code- Returns:
- the optional of CustomerCouponModel
-
saveCouponNotification
java.util.Optional<CouponNotificationModel> saveCouponNotification(java.lang.String couponCode)
Saves customer coupon notification- Parameters:
couponCode
- the coupon code- Returns:
- the optional of CouponNotificationModel
-
removeCouponNotificationByCode
void removeCouponNotificationByCode(java.lang.String couponCode)
Removes customer coupon notification- Parameters:
couponCode
- the coupon code
-
getCouponNotificationStatus
boolean getCouponNotificationStatus(java.lang.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(java.lang.String couponCode, CustomerModel customer)
Removes customer coupon for the customer- Parameters:
couponCode
- the coupon codecustomer
- the customer model
-
getEffectiveCustomerCouponsForCustomer
java.util.List<CustomerCouponModel> getEffectiveCustomerCouponsForCustomer(CustomerModel customer)
Gets effective customer coupons of the customer- Parameters:
customer
- the customer model- Returns:
- the list of CustomerCouponModel
-
getAssignableCustomerCoupons
java.util.List<CustomerCouponModel> getAssignableCustomerCoupons(CustomerModel customer, java.lang.String text)
Gets assignable customer coupons- Parameters:
customer
- the customer modeltext
- the text used for searching assignable customer coupons- Returns:
- the list of CustomerCouponModel
-
getAssignedCustomerCouponsForCustomer
java.util.List<CustomerCouponModel> getAssignedCustomerCouponsForCustomer(CustomerModel customer, java.lang.String text)
Gets assigned customer coupons- Parameters:
customer
- the customer modeltext
- the text used for searching assigned customer coupons- Returns:
- the list of CustomerCouponModel
-
getCustomerCouponForCode
java.util.Optional<CustomerCouponModel> getCustomerCouponForCode(java.lang.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 modelsearchPageData
- the data used for pagination- Returns:
- the paginated customer coupon models
-
getCouponNotificationsForCustomer
java.util.List<CouponNotificationModel> getCouponNotificationsForCustomer(CustomerModel customer)
Gets coupon notifications for the customer- Parameters:
customer
- the customer model- Returns:
- the list of CouponNotificationModel
-
getPromotionSourcesRuleForProductCategories
java.util.List<PromotionSourceRuleModel> getPromotionSourcesRuleForProductCategories(ProductModel product)
Gets promotionSourceRule for categories of product- Parameters:
product
- the product model- Returns:
- the list of PromotionSourceRuleModel
-
-