Interface VoucherRestrictionService

  • All Known Implementing Classes:
    DefaultVoucherRestrictionService

    public interface VoucherRestrictionService
    The [y] hybris Platform voucher extension enables users to assign a set of restrictions to a voucher for confining the usage of it. A combination of none, one, or many of the restrictions is possible. Developers can implement other restrictions in addition to those already there.

    In an order containing multiple items, (percentage) discounts will apply only to the products that match all of the criteria given by its assigned restrictions. The other products in the order are not discounted. Vouchers provide an interface for getting the eligible entries within an given order.

    • Method Detail

      • isFulfilled

        boolean isFulfilled​(RestrictionModel restriction,
                            AbstractOrderModel order)
        Returns true if the specified abstract order is not null and fulfills this restriction.
        Parameters:
        restriction - the restriction
        order - the abstract order to check whether it fullfills this restriction.
        Returns:
        true if the specified abstract order is not null and fulfills this restriction, false else.
      • isFulfilled

        boolean isFulfilled​(RestrictionModel restriction,
                            ProductModel product)
        Returns true if the specified product is not null and fulfills this restriction.
        Parameters:
        restriction - the restriction
        product - the product to check whether it fullfills this restriction.
        Returns:
        true if the specified product is not null and fulfills this restriction, false else.