Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Created February 8, 2026 22:33
Show Gist options
  • Select an option

  • Save trikitrok/bfee46074f81b60d84ba96b3fae6f6a4 to your computer and use it in GitHub Desktop.

Select an option

Save trikitrok/bfee46074f81b60d84ba96b3fae6f6a4 to your computer and use it in GitHub Desktop.
public class Invoice {
private final ShippingPricer shippingPricer;
// ...
public Invoice(
OurDate billingDate,
OurDate openingDate,
Originator originator
// ...
) {
// ...
this.shippingPricer = new ShippingPricer(billingDate, openingDate, originator);
}
// ...
public Money getValue() {
Money total = this.itemsSum();
total.add(this.shippingPricer.getPrice());
total.add(this.getTax());
return total;
}
private Money itemsSum() {
throw new RuntimeException("Not implemented");
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment