# `Accrue.Billing.MeteredRenewalActions`
[🔗](https://github.com/szTheory/accrue/blob/accrue-v1.1.1/lib/accrue/billing/metered_renewal_actions.ex#L1)

Opens immutable metered renewal windows from canonical Braintree renewal evidence.

# `author_local_invoice`

```elixir
@spec author_local_invoice(Ecto.UUID.t()) ::
  {:ok,
   %{
     invoice: Accrue.Billing.Invoice.t(),
     renewal: Accrue.Billing.MeteredRenewal.t()
   }}
  | {:error, term()}
```

# `mark_invoice_authored`

```elixir
@spec mark_invoice_authored(
  Accrue.Billing.MeteredRenewal.t(),
  Accrue.Billing.Invoice.t(),
  map()
) ::
  {:ok, Accrue.Billing.MeteredRenewal.t()} | {:error, term()}
```

# `open_braintree_renewal_window`

```elixir
@spec open_braintree_renewal_window(
  String.t(),
  DateTime.t() | nil,
  String.t() | nil,
  String.t()
) :: {:ok, Accrue.Billing.MeteredRenewal.t() | :ignored} | {:error, term()}
```

# `process_metered_renewal`

```elixir
@spec process_metered_renewal(Ecto.UUID.t()) ::
  {:ok,
   %{
     attempt: Accrue.Billing.MeteredChargeAttempt.t() | nil,
     renewal: Accrue.Billing.MeteredRenewal.t()
   }}
  | {:error, term()}
```

# `settle_metered_renewal`

```elixir
@spec settle_metered_renewal(
  Ecto.UUID.t(),
  keyword()
) ::
  {:ok,
   %{
     attempt: Accrue.Billing.MeteredChargeAttempt.t(),
     renewal: Accrue.Billing.MeteredRenewal.t()
   }}
  | {:error, term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
