# `Weavr.Identities`
[🔗](https://github.com/iamkanishka/weavr/blob/main/lib/weavr/resources/identities.ex#L1)

Convenience delegation module for working with both Corporate and Consumer
identities without specifying the type at the call site.

For the full, type-specific API with all operations (KYB/KYC, email
verification, fee charging, etc.), use `Weavr.Corporates` and
`Weavr.Consumers` directly.

# `create_consumer`

```elixir
@spec create_consumer(Weavr.Config.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}
```

Creates a Consumer identity. Delegates to `Weavr.Consumers.create/3`.

# `create_corporate`

```elixir
@spec create_corporate(Weavr.Config.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}
```

Creates a Corporate identity. Delegates to `Weavr.Corporates.create/3`.

# `get_consumer`

```elixir
@spec get_consumer(Weavr.Config.t(), String.t()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}
```

Gets the logged-in Consumer. Delegates to `Weavr.Consumers.get/2`.

# `get_corporate`

```elixir
@spec get_corporate(Weavr.Config.t(), String.t()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}
```

Gets the logged-in Corporate. Delegates to `Weavr.Corporates.get/2`.

# `update_consumer`

```elixir
@spec update_consumer(Weavr.Config.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}
```

Updates the logged-in Consumer. Delegates to `Weavr.Consumers.update/3`.

# `update_corporate`

```elixir
@spec update_corporate(Weavr.Config.t(), String.t(), map()) ::
  {:ok, map()} | {:error, Weavr.Error.t()}
```

Updates the logged-in Corporate. Delegates to `Weavr.Corporates.update/3`.

---

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