# WHMCS\Billing\Invoice\Item

`Class` · extends `AbstractModel` · implements `InvoiceItemInterface`, `ImmutableModelInterface`

Invoice line items

Each invoice is made up of individual line items.

Each line item is associated with a specific invoiceId.

## Traits

- `ImmutableModelTrait`


## Properties

| Type | Name | Description |
|  --- | --- | --- |
| `` | `$timestamps` |  |


## Methods

### boot

```php
public static function boot()
```

### isImmutable

```php
public function isImmutable(): bool
```

### validateMutability

```php
public function validateMutability(?string $attribute): void
```

### throwImmutabilityException

```php
public function throwImmutabilityException(string $message = '', string $column = ''): never
```

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$message` | Exception message, leave empty for default |
| `string` | `$column` | If specified, offending column name will be added to the exception message. |


**Returns** `never`

### invoice

```php
public function invoice()
```

Each invoice item belongs to an invoice.

**Returns** `\Illuminate\Database\Eloquent\Relations\BelongsTo`

### addon

```php
public function addon()
```

**Returns** `\Illuminate\Database\Eloquent\Relations\BelongsTo`

### domain

```php
public function domain()
```

**Returns** `\Illuminate\Database\Eloquent\Relations\BelongsTo`

### service

```php
public function service()
```

**Returns** `\Illuminate\Database\Eloquent\Relations\BelongsTo`

### scopeOnlyServices

```php
public function scopeOnlyServices($query)
```

### scopeOnlyAddons

```php
public function scopeOnlyAddons($query)
```

### scopeOnlyDomains

```php
public function scopeOnlyDomains($query)
```

### scopeClientId

```php
public function scopeClientId(Builder $query, int $userId)
```

### scopeNotInvoiced

```php
public function scopeNotInvoiced(Builder $query)
```

### getRelatedEntity

```php
public function getRelatedEntity()
```

**Returns** `Service\|Domain\|Addon\|null`