Money.Financial.payment
You're seeing just the function
payment
, go back to Money.Financial module for more information.
Specs
Calculates the payment for a given loan or annuity given a present value, an interest rate and a number of periods.
present_value
is a %Money{} representation of the present valueinterest_rate
is a float representation of an interest rate. For example, 12% would be represented as0.12
periods
is an integer number of periods
Example
iex> Money.Financial.payment Money.new(:USD, 100), 0.12, 20
#Money<:USD, 13.38787800396606622792492299>