package com.bookshop.behavioral.strategy;
import com.bookshop.domain.Customer;
import java.math.BigDecimal;
/**
* The strategy: one interchangeable pricing rule. A functional interface, so
* one-off strategies can be lambdas -- the modern face of this pattern.
*/
@FunctionalInterface
public interface DiscountStrategy {
/** Returns the discount (not the final price) for this subtotal and customer. */
BigDecimal discountFor(BigDecimal subtotal, Customer customer);
}