operator <= method
Returns true
when this money is less than or equal to other
.
Both operands have to be in same currency, ArgumentError will be thrown otherwise.
Implementation
bool operator <=(Money other) {
_preconditionThatCurrencyTheSameFor(
other, () => 'Cannot compare money in different currencies.');
return amount <= other.amount;
}