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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VoucherEntrySet
getApplicableEntries(RestrictionModel restriction, AbstractOrderModel order)
boolean
isFulfilled(RestrictionModel restriction, AbstractOrderModel order)
Returns true if the specified abstract order is not null and fulfills this restriction.boolean
isFulfilled(RestrictionModel restriction, ProductModel product)
Returns true if the specified product is not null and fulfills this restriction.
-
-
-
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 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
VoucherEntrySet getApplicableEntries(RestrictionModel restriction, AbstractOrderModel order)
-
isFulfilled
boolean isFulfilled(RestrictionModel restriction, ProductModel product)
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.
-
-