Account billing details and per-zone usage summaries.
Uses the main API client created with Bunnyx.new/1.
Usage
client = Bunnyx.new(api_key: "sk-...")
{:ok, billing} = Bunnyx.Billing.details(client)
{:ok, summary} = Bunnyx.Billing.summary(client)
Summary
Functions
Returns account billing details including balance, charges, and usage.
Downloads a payment request invoice PDF.
Returns pending payment requests.
Returns a per-pull-zone usage summary for the current month.
Downloads a billing summary PDF for a billing record.
Functions
@spec details(Bunnyx.t() | keyword()) :: {:ok, map()} | {:error, Bunnyx.Error.t()}
Returns account billing details including balance, charges, and usage.
@spec invoice_pdf(Bunnyx.t() | keyword(), pos_integer()) :: {:ok, binary()} | {:error, Bunnyx.Error.t()}
Downloads a payment request invoice PDF.
@spec pending_payments(Bunnyx.t() | keyword()) :: {:ok, [map()]} | {:error, Bunnyx.Error.t()}
Returns pending payment requests.
@spec summary(Bunnyx.t() | keyword()) :: {:ok, [map()]} | {:error, Bunnyx.Error.t()}
Returns a per-pull-zone usage summary for the current month.
@spec summary_pdf(Bunnyx.t() | keyword(), pos_integer()) :: {:ok, binary()} | {:error, Bunnyx.Error.t()}
Downloads a billing summary PDF for a billing record.