# `Accrue.Entitlements.Snapshot`
[🔗](https://github.com/szTheory/accrue/blob/accrue-v1.5.1/lib/accrue/entitlements/snapshot.ex#L1)

A deterministic, privacy-bounded view of an account's effective grants.

The snapshot is derived from current grant rows; it is never persisted and
never contains provider evidence or lineage identifiers.

# `source`

```elixir
@type source() :: %{
  :rail =&gt; atom(),
  :environment =&gt; atom(),
  :logical_plan =&gt; atom(),
  :effective_at =&gt; DateTime.t(),
  optional(:expires_at) =&gt; DateTime.t() | nil,
  optional(:revoked_at) =&gt; DateTime.t() | nil
}
```

# `t`

```elixir
@type t() :: %Accrue.Entitlements.Snapshot{
  account_id: Ecto.UUID.t() | String.t(),
  authorization_bounds: term(),
  features: [atom()],
  plans: [atom()],
  quantities: %{optional(atom()) =&gt; pos_integer()},
  revision: non_neg_integer(),
  sources: [source()]
}
```

# `authorization_signature`

```elixir
@spec authorization_signature(t()) :: term()
```

The material authorization fields used for monotonic revision decisions.

# `fetch`

```elixir
@spec fetch(Ecto.Repo.t(), map() | Ecto.UUID.t(), keyword()) :: t() | nil
```

Fetches and folds an account's current grants without mutating state.

# `from_grants`

```elixir
@spec from_grants(
  [Accrue.Entitlements.Grant.t() | map()],
  keyword()
) :: t()
```

---

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