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

Shared writer for advisory entitlement-summary snapshots.

Webhooks and pull refreshes both reduce to the same summary-shaped
`Accrue.Billing.EntitlementSummary` row. This module owns only that
observational cache write; grant decisions remain local-only.

# `source`

```elixir
@type source() :: :webhook | :pull
```

# `write_pull`

```elixir
@spec write_pull(Accrue.Billing.Customer.t(), DateTime.t(), [map()], String.t()) ::
  {:ok, Accrue.Billing.EntitlementSummary.t() | :unchanged | :stale}
  | {:error, term()}
```

# `write_webhook`

```elixir
@spec write_webhook(String.t() | nil, DateTime.t() | nil, map(), atom() | String.t()) ::
  {:ok, Accrue.Billing.EntitlementSummary.t() | :stale | :deferred | :ignored}
  | {:error, term()}
```

---

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