# `ExWapp.Quota`
[🔗](https://github.com/elchemista/ex_wapp/blob/v0.1.5/lib/ex_wapp/quota.ex#L1)

Tracks configurable daily outbound-message quotas.

The counter state lives in the session worker and is split across the whole
session, individual JIDs, and groups. `check_and_increment/2` returns the
updated worker state and an explicit error when a blocking limit is hit.

# `state_data`

```elixir
@type state_data() :: %{
  period_key: String.t(),
  session_count: non_neg_integer(),
  per_jid: %{optional(String.t()) =&gt; non_neg_integer()},
  per_group: %{optional(String.t()) =&gt; non_neg_integer()}
}
```

# `check_and_increment`

```elixir
@spec check_and_increment(map(), String.t()) :: {:ok, map()} | {:error, term(), map()}
```

# `new`

```elixir
@spec new(map()) :: state_data()
```

---

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