# WHMCS\Billing\Payment\DisputeInterface

`Interface`

DisputeInterface is used as part of the WHMCS\Billing\Payment\Dispute object to ensure
that all required methods are present for output.
Utilise the factory method to initialise the DisputeInterface object that will be added to
a DisputeCollection object in your custom gateway module.

## Methods

### factory

```php
public static function factory(string $id, float $amount, string $currencyCode, string $transactionId, Carbon $createdDate, Carbon $respondBy, string $reason, string $status): DisputeInterface
```

Factory method for a Dispute to create the object with the minimum required
information to display a dispute within WHMCS.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$id` |  |
| `float` | `$amount` |  |
| `string` | `$currencyCode` |  |
| `string` | `$transactionId` |  |
| `Carbon` | `$createdDate` |  |
| `Carbon` | `$respondBy` |  |
| `string` | `$reason` |  |
| `string` | `$status` |  |


**Returns** `DisputeInterface`

### setEvidence

```php
public function setEvidence(array $evidence): DisputeInterface
```

Set an array of evidence. The evidence array format requires each item have
a name and value.

Sanitization contract: when an item's `value` is a string, it is echoed as
raw HTML by the admin dispute view in order to preserve formatting markup.
Any gateway-supplied (tainted) fields that the module interpolates into
that string MUST therefore be encoded by the module before being passed in
— for example with \WHMCS\Input\Sanitize::encode(). When `value` is an
array of the shape ['url' => ..., 'filename' => ...], both fields are
encoded at the view sink and no module-side encoding is required.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `array` | `$evidence` |  |


**Returns** `self`

### setEvidenceType

```php
public function setEvidenceType(string $evidenceKey, string $evidenceType): DisputeInterface
```

Override an evidence type from 'text' to one of 'file' or 'textarea'.
Any $evidenceKey provided in setEvidence will default to the type of text.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$evidenceKey` |  |
| `string` | `$evidenceType` |  |


**Returns** `self`

### setGateway

```php
public function setGateway(string $gateway): DisputeInterface
```

Set the gateway module filename for the dispute for additional loading
when viewing a specific dispute.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$gateway` |  |


**Returns** `self`

### setIsClosable

```php
public function setIsClosable(bool $closable): DisputeInterface
```

Set whether the dispute is closable. This will show the close button on a dispute
when set to true.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `bool` | `$closable` |  |


**Returns** `DisputeInterface`

### setIsSubmittable

```php
public function setIsSubmittable(bool $submittable): DisputeInterface
```

Set whether the dispute is submittable. This will show the submit dispute button
on a dispute when set to true.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `bool` | `$submittable` |  |


**Returns** `DisputeInterface`

### setIsUpdatable

```php
public function setIsUpdatable(bool $updatable): DisputeInterface
```

Set whether the dispute is updatable. This will show the update dispute button
on a dispute when set to true allowing evidence to be submitted.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `bool` | `$updatable` |  |


**Returns** `DisputeInterface`

### setTransactionId

```php
public function setTransactionId(string $transactionId): DisputeInterface
```

Set the related transaction id for the dispute.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$transactionId` |  |


**Returns** `DisputeInterface`