Wardrik.Ceilings (wardrik_protocol v0.1.0-rc.1)

Copy Markdown

Operations on an org's ceilings: the budgets its agents share.

Wardrik.Ceilings.list(scope, owner: "acme")
#=> {:ok, [%Wardrik.Spend{ceiling: "plan", limit: %Wardrik.Amount{usd: 20.0}, ...}]}

Reading them needs ceiling.read on the org's acme/ceiling. The :reader role has it. Approving a call past a ceiling needs ceiling.approve. The :owner role has it. See Wardrik.Ceiling.

Summary

Functions

List an org's ceilings

Functions

list(scope, input \\ [])

@spec list(Wardrik.Scope.t(), term()) :: term() | :ok | {:error, Wardrik.Error.t()}

List an org's ceilings

Each budget the org's agents spend from together, with its limit, what they've spent against it in its period now, what approvals granted, and when it starts over.

GET /v1/ceilings