# `OpenPayments.Types.ClientDisplay`
[🔗](https://github.com/interledger/open-payments-elixir/blob/v1.0.0/lib/open_payments/types/client_display.ex#L1)

Self-asserted client information shown by an authorization server during consent.

The pinned `client-display` schema permits optional `name`, `uri` and `logo_uri`
fields and forbids other fields. Omitted fields become nil and are omitted on
encoding; explicit JSON nulls are invalid. An empty display object is permitted.

URI fields follow the schema's absolute-URI format. Their spelling is preserved,
including `data:` image URIs. This type does not fetch an image, verify ownership,
or restrict URI schemes to HTTP. The wire field is `logo_uri`, not `logoUri`.

Struct literals can bypass validation. Call `validate/1` after constructing or
modifying a struct; `to_map/1` converts its shape without validating it.

# `t`

```elixir
@type t() :: %OpenPayments.Types.ClientDisplay{
  logo_uri: String.t() | nil,
  name: String.t() | nil,
  uri: String.t() | nil
}
```

# `from_map`

```elixir
@spec from_map(map()) :: {:ok, t()} | {:error, OpenPayments.Error.t()}
```

Decodes and validates client-display JSON without fetching its URIs.

# `to_map`

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

Converts to protocol fields, omitting nil values, without validating.

# `validate`

```elixir
@spec validate(t()) :: :ok | {:error, OpenPayments.Error.t()}
```

Validates a struct, treating nil fields as omitted.

---

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