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

Metrics

Metrics API operations.

# `create_metric_dashboard`

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

Create Metric Dashboard

Create a user-defined metric dashboard.

**Scopes**: `metrics:write`

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

# `delete_metric_dashboard`

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

Delete Metric Dashboard

Delete a user-defined metric dashboard.

**Scopes**: `metrics:write`

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

# `export_metrics`

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

Export Metrics

Export metrics as a CSV file.

**Scopes**: `metrics:read`

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

# `get_metric_dashboard`

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

Get Metric Dashboard

Get a user-defined metric dashboard by ID.

**Scopes**: `metrics:read`

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

# `get_metrics`

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

Get Metrics

Get metrics about your orders and subscriptions.

Currency values are output in cents.

**Scopes**: `metrics:read`

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

# `get_metrics_limits`

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

Get Metrics Limits

Get the interval limits for the metrics endpoint.

**Scopes**: `metrics:read`

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

# `list_metric_dashboards`

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

List Metric Dashboards

List user-defined metric dashboards.

**Scopes**: `metrics:read`

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

# `update_metric_dashboard`

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

Update Metric Dashboard

Update a user-defined metric dashboard.

**Scopes**: `metrics:write`

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

---

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