Interface CustomerCouponService

    • Method Detail

      • 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

        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 code
        customer - 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 code
        customer - 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 model
        text - 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 model
        text - 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 model
        searchPageData - 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