# WHMCS\UsageBilling\Metrics\Metric

`Class` · implements `MetricInterface`

Metric

## Methods

### __construct

```php
public function __construct($systemName, $displayName = null, $type = null, UnitInterface $units = null, UsageInterface $usage = null)
```

Metric

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$systemName` | Canonical name to be used by code and between systems |
| `string` | `$displayName` | Text containing a friendly name to render in UI to users |
| `string|null` | `$type` | The metric type, one of MetricInterface::TYPE_* |
| `UnitInterface|null` | `$units` |  |
| `UsageInterface|null` | `$usage` |  |


### usage

```php
public function usage()
```

### withUsage

```php
public function withUsage(UsageInterface $usage = null)
```

### units

```php
public function units()
```

### systemName

```php
public function systemName()
```

### displayName

```php
public function displayName()
```

### type

```php
public function type()
```