# `Pluggy.Loans`
[🔗](https://github.com/fellipessanha/pluggy_ai_ex/blob/main/lib/pluggy/loans.ex#L1)

Functions for interacting with the Pluggy Loans API.

# `get`

```elixir
@spec get(Pluggy.Client.t(), String.t()) :: {:ok, term()} | {:error, Pluggy.Error.t()}
```

Gets a loan by ID.

# `get!`

```elixir
@spec get!(Pluggy.Client.t(), String.t()) :: term()
```

# `list`

```elixir
@spec list(Pluggy.Client.t(), String.t(), keyword()) ::
  {:ok, term()} | {:error, Pluggy.Error.t()}
```

Lists loans for a given item.

# `list!`

```elixir
@spec list!(Pluggy.Client.t(), String.t(), keyword()) :: term()
```

# `list_with_cursor`

```elixir
@spec list_with_cursor(Pluggy.Client.t(), String.t(), keyword()) ::
  {:ok, map(), Pluggy.HTTP.Cursor.t() | nil} | {:error, Pluggy.Error.t()}
```

Lists loans with cursor-based pagination.

Returns `{:ok, response, cursor}` where `cursor` is a `%Pluggy.HTTP.Cursor{}`
when more pages are available, or `nil` when on the last page.

Pass the cursor to `Pluggy.HTTP.with_cursor/1` to fetch the next page.

---

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