AuroraMeter. Plan
(Aurora Meter v0.1.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.{:feature, boolean}— plain feature access (no quota).
Summary
Types
@type feature_config() :: {:limit, non_neg_integer(), :hard} | {:metered, non_neg_integer(), number()} | {:feature, boolean()}
@type t() :: %AuroraMeter.Plan{ features: %{optional(atom()) => feature_config()}, id: atom(), price: non_neg_integer() }