operator + method

Money operator +(
  1. Money summand
)

Adds operands.

Both operands must be in same currency, ArgumentError will be thrown otherwise.

Implementation

Money operator +(Money summand) {
  _preconditionThatCurrencyTheSameFor(summand);

  return _withAmount(amount + summand.amount);
}