AuroraMeter. Plan
(Aurora Meter v0.4.0)
View Source
A billing plan: an id, a monthly price (minor units / cents), and a map of feature configurations.
Feature configs:
{:limit, n, :hard}— hard cap; blocks atn.{:metered, included, unit_price}— allow overage; bill beyondincluded.{:counter}— measured, never blocked, never billed; no denominator.{:feature, boolean}— plain feature access (no quota).{:feature, non_neg_integer}— a plan-level value with no counter behind it (seats, retention days, projects): always entitled; read it withAuroraMeter.feature_value/3.
Summary
Types
@type feature_config() :: {:limit, non_neg_integer(), :hard} | {:metered, non_neg_integer(), number()} | {:counter} | {:feature, boolean() | non_neg_integer()}
@type t() :: %AuroraMeter.Plan{ features: %{optional(atom()) => feature_config()}, id: atom(), price: non_neg_integer() }