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

Manage Stripe products for digital goods and SaaS.

Products must use eligible tax codes for Managed Payments.
See `StripeManaged.TaxCode` for the full list.

## Example

    {:ok, product} = StripeManaged.Product.create(%{
      name: "Pro Plan",
      description: "Full access to all features",
      tax_code: "txcd_10103001",
      default_price_data: %{
        unit_amount: 2900,
        currency: "usd",
        recurring: %{interval: "month"}
      }
    })

# `create`

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

Creates a new product.

# `delete`

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

Deletes a product (only if it has no prices).

# `list`

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

Lists products. Accepts optional filter params.

# `list_all`

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

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

# `retrieve`

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

Retrieves a product by ID.

# `update`

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

Updates a product.

---

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