Summary
Functions
A sample %MishkaPay.Subscription.Schedule.Phases{} populated from defaults + type-based fallbacks.
Types
@type t() :: %MishkaPay.Subscription.Schedule.Phases{ end_at: DateTime.t() | nil, interval: (:day | :week | :month | :year) | nil, items: [MishkaPay.Price.t()] | nil, iterations: pos_integer() | nil, proration: (:create_prorations | :always_invoice | :none) | nil, start_at: DateTime.t() | nil, trial: boolean() | nil, trial_end_at: DateTime.t() | nil }
The struct that builder/1 returns.
| Field | Type | Required | Default | Description | Derives |
|---|---|---|---|---|---|
:items | [MishkaPay.Price.t()] | nil | no | validate(list) | ||
:start_at | DateTime.t() | nil | no | validate(struct) | ||
:end_at | DateTime.t() | nil | no | validate(struct) | ||
:iterations | pos_integer() | nil | no | validate(integer, min_len=1) | ||
:interval | :day | :week | :month | :year | nil | no | validate(enum=Atom[day::week::month::year])<br>validator {MishkaPay.Price, :interval} | ||
:trial | boolean() | nil | no | validate(boolean) | ||
:trial_end_at | DateTime.t() | nil | no | validate(struct) | ||
:proration | :create_prorations | :always_invoice | :none | nil | no | validate(enum=Atom[create_prorations::always_invoice::none])<br>validator {MishkaPay.Subscription, :proration} |