Money.Subscription.new-exclamation-mark
You're seeing just the function
new-exclamation-mark
, go back to Money.Subscription module for more information.
Specs
new!( plan :: Money.Subscription.Plan.t(), effective_date :: Date.t(), Keyword.t() ) :: t() | no_return()
Creates a new subscription or raises an exception.
Arguments
plan
is anyMoney.Subscription.Plan.t
the defines the initial planeffective_date
is aDate.t
that represents the effective date of the initial plan. This defines the start of the first interval:options
is a keyword list of options
Options
:id
is any term that an application can use to uniquely identify this subscription. It is not used in any function in this module.:created_at
is aDateTime.t
that records the timestamp when the subscription was created. The default isDateTime.utc_now/0
Returns
A
Money.Subscription.t
orraises an exception