# `PolarExpress.Services.DiscountsService`
[🔗](https://github.com/jeffhuen/polar_express/blob/main/lib/polar_express/services/discounts_service.ex#L2)

Discounts

Discounts API operations.

# `create_discount`

```elixir
@spec create_discount(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.Discount.t()} | {:error, PolarExpress.Error.t()}
```

Create Discount

Create a discount.

**Scopes**: `discounts:write`

See `PolarExpress.Params.DiscountsCreateDiscountParams` for parameter details.

# `delete_discount`

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

Delete Discount

Delete a discount.

**Scopes**: `discounts:write`

See `PolarExpress.Params.DiscountsDeleteDiscountParams` for parameter details.

# `get_discount`

```elixir
@spec get_discount(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.Discount.t()} | {:error, PolarExpress.Error.t()}
```

Get Discount

Get a discount by ID.

**Scopes**: `discounts:read` `discounts:write`

See `PolarExpress.Params.DiscountsGetDiscountParams` for parameter details.

# `list_discounts`

```elixir
@spec list_discounts(PolarExpress.Client.t(), map(), keyword()) ::
  {:ok, PolarExpress.ListObject.t()} | {:error, PolarExpress.Error.t()}
```

List Discounts

List discounts.

**Scopes**: `discounts:read` `discounts:write`

See `PolarExpress.Params.DiscountsListDiscountsParams` for parameter details.

# `update_discount`

```elixir
@spec update_discount(PolarExpress.Client.t(), String.t(), map(), keyword()) ::
  {:ok, PolarExpress.Schemas.Discount.t()} | {:error, PolarExpress.Error.t()}
```

Update Discount

Update a discount.

**Scopes**: `discounts:write`

See `PolarExpress.Params.DiscountsUpdateDiscountParams` for parameter details.

---

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