Documentation
¶
Overview ¶
Package revenue is the fleet REVENUE aggregate (/v1/admin/revenue) — the operator's money board: total prepaid balances held, total realized spend, MRR, a per-customer revenue table, ARPU, and a real spend trend. SuperAdmin only (core.Admit).
This is ORTHOGONAL to /v1/admin/finance: finance is the COGS/margin god-view (what WE pay vendors); revenue is the CUSTOMER money view (what each customer holds/spends/ subscribes). Every number is a real commerce read; an unreachable org degrades to honest zero, and a partial fleet read marks its source degraded.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RevenueCustomer ¶
type RevenueCustomer struct {
Org string `json:"org"`
Display string `json:"display"`
Plan string `json:"plan"`
BalanceCents int64 `json:"balanceCents"`
SpendCents int64 `json:"spendCents"`
MRRCents int64 `json:"mrrCents"`
}
RevenueCustomer is one row of the per-customer revenue table.
type RevenueData ¶
type RevenueData struct {
TotalBalancesCents int64 `json:"totalBalancesCents"`
TotalSpendCents int64 `json:"totalSpendCents"`
MRRCents int64 `json:"mrrCents"`
Customers int `json:"customers"`
PayingCustomers int `json:"payingCustomers"`
ARPUCents int64 `json:"arpuCents"`
PerCustomer []RevenueCustomer `json:"perCustomer"`
SpendTrend []core.SeriesPoint `json:"spendTrend"`
GeneratedAt string `json:"generatedAt"`
Sources []core.SourceStatus `json:"sources"`
}
RevenueData is the whole GET /v1/admin/revenue payload.
type RevenueOut ¶
type RevenueOut struct {
Status string `json:"status"`
Msg string `json:"msg"`
Data *RevenueData `json:"data"`
}
RevenueOut is the GET /v1/admin/revenue envelope.