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

Durable, owner-stable entitlement identity.

Hosts authenticate and supply the opaque owner identity before calling this
boundary. The resulting UUID is not derived from the owner and is suitable
for future rail-specific account binding.

# `t`

```elixir
@type t() :: %Accrue.Entitlements.Account{
  __meta__: term(),
  id: term(),
  inserted_at: term(),
  owner_id: term(),
  owner_type: term(),
  revision: term(),
  updated_at: term()
}
```

# `changeset`

```elixir
@spec changeset(t() | Ecto.Changeset.t(), map()) :: Ecto.Changeset.t()
```

Builds the owner-identity changeset and maps the database uniqueness authority.

# `fetch_or_create`

```elixir
@spec fetch_or_create(Ecto.Repo.t(), String.t(), String.t()) ::
  {:ok, t()} | {:error, Ecto.Changeset.t()}
```

Fetches or creates the single durable account for an authenticated owner identity.

---

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