Money.sub
You're seeing just the function
sub
, go back to Money module for more information.
Specs
Subtract one Money
value struct from another.
Options
money_1
andmoney_2
are any validMoney.t
types returned byMoney.new/2
Returns
{:ok, money}
or{:error, reason}
Example
iex> Money.sub Money.new(:USD, 200), Money.new(:USD, 100)
{:ok, Money.new(:USD, 100)}