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

Benefits

Benefits API operations.

# `create_benefit`

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

Create Benefit

Create a benefit.

**Scopes**: `benefits:write`

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

# `delete_benefit`

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

Delete Benefit

Delete a benefit.

> [!WARNING]
> Every grants associated with the benefit will be revoked.
> Users will lose access to the benefit.

**Scopes**: `benefits:write`

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

# `get_benefit`

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

Get Benefit

Get a benefit by ID.

**Scopes**: `benefits:read` `benefits:write`

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

# `list_benefit_grants`

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

List Benefit Grants

List the individual grants for a benefit.

It's especially useful to check if a user has been granted a benefit.

**Scopes**: `benefits:read` `benefits:write`

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

# `list_benefits`

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

List Benefits

List benefits.

**Scopes**: `benefits:read` `benefits:write`

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

# `update_benefit`

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

Update Benefit

Update a benefit.

**Scopes**: `benefits:write`

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

---

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