# WHMCS\User\Client\Affiliate

`Class` · extends `AbstractModel`

Client affiliate information

If a WHMCS operator turns on the affiliate payment system, then a client
account can become an affiliate. An affiliate record is attached to a
specific client and provides configuration information to the affiliate
system so that client can handle payments and commissions. It also tracks the
balance available, amount withdrawn, and the number of visitors an affiliate
has brought to an operator's WHMCS installation.

## Methods

### boot

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

### accounts

```php
public function accounts(): Relation
```

### client

```php
public function client()
```

Each affiliate belongs to one client.

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

### history

```php
public function history(): Relation
```

### hits

```php
public function hits(): Relation
```

### referrers

```php
public function referrers(): Relation
```

### withdrawals

```php
public function withdrawals(): Relation
```

### pending

```php
public function pending(): Relation
```

### getReferralLink

```php
public function getReferralLink(): string
```

### getAdminLink

```php
public function getAdminLink(): string
```

### getFullAdminUrl

```php
public function getFullAdminUrl(): string
```

### getPendingCommissionAmountAttribute

```php
public function getPendingCommissionAmountAttribute(): float
```