# WHMCS\UsageBilling\Contracts\Metrics\UnitInterface

`Interface`

UnitInterface

## Constants

| Name | Description |
|  --- | --- |
| `TYPE_CURRENCY` |  |
| `TYPE_FLOAT_PRECISION_LOW` |  |
| `TYPE_FLOAT_PRECISION_HIGH` |  |
| `TYPE_INT` |  |
| `TYPE_MICROTIME` |  |


## Methods

### name

```php
public function name()
```

**Returns** `string`

### perUnitName

```php
public function perUnitName($value = 0)
```

**Returns** `string`

### prefix

```php
public function prefix()
```

**Returns** `string`

### suffix

```php
public function suffix()
```

**Returns** `string`

### type

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

Type of data; ie microtime, float, int, currency

**Returns** `string`

### decorate

```php
public function decorate($value)
```

### formatForType

```php
public function formatForType($value)
```

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string|float|int` | `$value` |  |


**Returns** `string`

### roundForType

```php
public function roundForType($value)
```

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string|float|int` | `$value` |  |


**Returns** `float\|int`