ascetic_ddd.seedwork.domain.values.money.expression¶
Classes
Interface for monetary expressions. |
- class ascetic_ddd.seedwork.domain.values.money.expression.Expression[source]¶
Bases:
ABCInterface for monetary expressions.
This is the core abstraction that allows Money and Sum to be treated uniformly, enabling complex operations like adding different currencies.
- abstractmethod reduce(bank, to)[source]¶
Reduce this expression to a Money object in the target currency.
- abstractmethod plus(addend)[source]¶
Add another expression to this one.