# WHMCS\Billing\Payment\Dispute\DisputeCollection

`Class` · extends `Collection`

## Methods

### factoryFromItems

```php
public static function factoryFromItems(DisputeInterface ...$dispute): DisputeCollection
```

The recommended method for creating a DisputeCollection object that should be
returned via the custom gateway module.

**Returns** `static`

### factoryFromArray

```php
public static function factoryFromArray(array $disputes): DisputeCollection
```

Make a DisputeCollection object from an array of data.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `array` | `$disputes` | An array of disputes made from a DisputeInterface object. |


**Returns** `static`

### addDispute

```php
public function addDispute(DisputeInterface $dispute): self
```

Add a single DisputeInterface object to an existing BalanceCollection.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `DisputeInterface` | `$dispute` | A single DisputeInterface object |


**Returns** `$this`