Package de.hybris.platform.voucher
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 Summary
Modifier and TypeMethodDescriptiongetApplicableEntries(RestrictionModel restriction, AbstractOrderModel order) booleanisFulfilled(RestrictionModel restriction, AbstractOrderModel order) Returns true if the specified abstract order is not null and fulfills this restriction.booleanisFulfilled(RestrictionModel restriction, ProductModel product) Returns true if the specified product is not null and fulfills this restriction.
-
Method Details
-
isFulfilled
Returns true if the specified abstract order is not null and fulfills this restriction.- Parameters:
restriction- the restrictionorder- 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.
-
getApplicableEntries
-
isFulfilled
Returns true if the specified product is not null and fulfills this restriction.- Parameters:
restriction- the restrictionproduct- the product to check whether it fullfills this restriction.- Returns:
- true if the specified product is not null and fulfills this restriction, false else.
-