Persisted recurring-payment authority and settlement state.
billing_anchor is the start of the first paid period. Provider-specific
authority belongs in method_state; the remaining fields model billing
periods shared by every subscription method.
Summary
Types
@type payment() :: %{ period: non_neg_integer(), reference: String.t(), timestamp: String.t(), event_ids: [String.t()] }
@type t() :: %MPP.Subscription.Record{ billing_anchor: DateTime.t(), cancellation_effective_at: DateTime.t() | nil, in_flight_period: non_neg_integer() | nil, in_flight_reference: String.t() | nil, last_charged_period: non_neg_integer(), method: String.t(), method_state: map(), payments: %{required(non_neg_integer()) => payment()}, reference: String.t(), subscription: MPP.Intents.Subscription.t(), subscription_id: String.t(), timestamp: String.t() }