# `Ash.CodeInterface`
[🔗](https://github.com/ash-project/ash/blob/v3.27.8/lib/ash/code_interface.ex#L5)

Used to define the functions of a code interface for a resource.

# `can?`

# `define_interface`
*macro* 

Defines the code interface for a given resource + domain combination in the current module. For example:

```elixir
defmodule MyApp.Accounting do
  require Ash.CodeInterface

  Ash.CodeInterface.define_interface(MyApp.Accounting, MyApp.Accounting.Transaction)
  Ash.CodeInterface.define_interface(MyApp.Accounting, MyApp.Accounting.Account)
  Ash.CodeInterface.define_interface(MyApp.Accounting, MyApp.Accounting.Invoice)
end
```

# `params_and_opts`

```elixir
@spec params_and_opts(
  params_or_opts :: map() | [map()] | keyword(),
  keyword(),
  (keyword() -&gt; keyword())
) :: {params :: map() | [map()], opts :: keyword()}
```

See `params_and_opts/2`.

Adds a post process function that can takes the opts and can further process,
validate, or transform them.

# `resolve_action_subject`

# `resolve_create_subject`

# `resolve_params_and_opts`

# `resolve_read_subject`

---

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