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

Incoming-payment permissions in a grant's `access-item` union.

Required `type` is `incoming-payment`; required `actions` is an array of unique
strings from create, complete, read, read-all, list and list-all. Empty actions
are allowed by the pinned schema. Optional `identifier` is an absolute URI:
omission becomes nil, while explicit JSON null is invalid. Its spelling is
preserved without HTTP request-target validation or payment-pointer conversion.

The enclosing access-item union forbids extra fields. This grant-facing type
enforces that rule even though the standalone access-incoming branch does not
repeat it. Inspection omits the identifier; explicit map/JSON export includes it.
Decoding permissions does not obtain a grant or authorize a network request.

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.AccessIncoming{
  actions: [String.t()],
  identifier: String.t() | nil,
  type: String.t()
}
```

# `from_map`

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

Decodes an incoming-payment grant access entry using the union's field rules.

# `to_map`

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

Converts to protocol fields, omitting a nil identifier, without validating.

# `validate`

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

Validates a struct, treating a nil identifier as omitted.

---

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