# `AccessGrid.LedgerItem`
[🔗](https://github.com/Access-Grid/accessgrid-ex/blob/main/lib/access_grid/ledger_item.ex#L1)

A line item from the account's billing ledger. Returned by
`AccessGrid.Console.list_ledger_items/1`.

`access_pass` is populated when the ledger item is tied to a specific access
pass — typically credit/debit lines for issuance, renewals, etc. It is `nil`
for line items that aren't pass-scoped.

The API returns both `id` and `ex_id` for ledger items (same value); `ex_id`
is deprecated. This struct reads from `id`.

# `t`

```elixir
@type t() :: %AccessGrid.LedgerItem{
  access_pass: AccessGrid.LedgerItem.AccessPass.t() | nil,
  amount: number() | nil,
  created_at: String.t() | nil,
  event: String.t() | nil,
  id: String.t() | nil,
  kind: String.t() | nil,
  metadata: map()
}
```

# `from_response`

```elixir
@spec from_response(map()) :: t()
```

Creates a LedgerItem struct from an API response map.

---

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