# `StripeManaged.Price`
[🔗](https://github.com/safemyprivacy0-bit/stripe_managed/blob/main/lib/stripe_managed/price.ex#L1)

Manage prices for Stripe products.

Each product can have multiple prices (monthly, yearly, etc.).
Tax behavior defaults to `exclusive` in Managed Payments
(tax added on top of the stated price).

## Example

    {:ok, price} = StripeManaged.Price.create(%{
      product: "prod_abc123",
      unit_amount: 29900,
      currency: "usd",
      recurring: %{interval: "year"},
      tax_behavior: "exclusive"
    })

# `create`

```elixir
@spec create(
  map(),
  keyword()
) :: StripeManaged.Client.response()
```

Creates a new price.

# `list`

```elixir
@spec list(
  map(),
  keyword()
) :: StripeManaged.Client.response()
```

Lists prices. Accepts optional filter params like `product`.

# `list_all`

```elixir
@spec list_all(
  map(),
  keyword()
) :: Enumerable.t()
```

Returns a lazy Stream of all prices, auto-paginating.

# `retrieve`

```elixir
@spec retrieve(
  String.t(),
  keyword()
) :: StripeManaged.Client.response()
```

Retrieves a price by ID.

# `update`

```elixir
@spec update(String.t(), map(), keyword()) :: StripeManaged.Client.response()
```

Updates a price. Only `active`, `metadata`, `nickname`, and `tax_behavior` can be updated.

---

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