# WHMCS\Domain\Registrar\Domain

`Class`

Store information regarding the domain that can be used within
the product without requiring additional Registrar calls.
Where a get method returns null, no value has been set for the requested
variable and the result should not be used.

## Constants

| Name | Description |
|  --- | --- |
| `STATUS_ACTIVE` | Domain Status Constants |
| `STATUS_ARCHIVED` |  |
| `STATUS_DELETED` |  |
| `STATUS_EXPIRED` |  |
| `STATUS_INACTIVE` |  |
| `STATUS_SUSPENDED` |  |
| `STATUS_PENDING_DELETE` |  |


## Methods

### getRegistrantEmailAddress

```php
public function getRegistrantEmailAddress()
```

Retrieve the stored value for the registrant email address.

**Returns** `null\|string`

### setRegistrantEmailAddress

```php
public function setRegistrantEmailAddress($registrantEmailAddress)
```

Set the registrant email address for the domain.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `null|string` | `$registrantEmailAddress` |  |


**Returns** `self`

### getDomain

```php
public function getDomain()
```

Get the stored value for the domain.

**Returns** `string\|null`

### setDomain

```php
public function setDomain($domain)
```

Set the domain name.

**Parameters**

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


**Returns** `self`

### getExpiryDate

```php
public function getExpiryDate()
```

Retrieve the expiry date of the domain

**Returns** `Carbon\|null`

### setExpiryDate

```php
public function setExpiryDate(Carbon $expiryDate = null)
```

Set the expiry date value of the domain using a carbon object.

Example: Carbon::createFromFormat('Y-m-d', '2022-12-12')

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `Carbon|null` | `$expiryDate` |  |


**Returns** `self`

### getRegistrationStatus

```php
public function getRegistrationStatus()
```

Retrieve the stored registration status

**Returns** `string\|null`

### setRegistrationStatus

```php
public function setRegistrationStatus($registrationStatus)
```

Set the registration status of the domain using the status
constants within this class:

STATUS_ACTIVE
STATUS_ARCHIVED
STATUS_DELETED
STATUS_EXPIRED
STATUS_INACTIVE
STATUS_SUSPENDED
STATUS_PENDING_DELETE

**Parameters**

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


**Returns** `self`

### getRestorable

```php
public function getRestorable()
```

Retrieve if the domain is restorable.

**Returns** `boolean\|null`

### setRestorable

```php
public function setRestorable($restorable)
```

Set if the domain is currently restorable if the expiry date has passed.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$restorable` |  |


**Returns** `self`

### getRenewBeforeExpiration

```php
public function getRenewBeforeExpiration()
```

Check if the domain can be renewed before expiry

**Returns** `boolean\|null`

### setRenewBeforeExpiration

```php
public function setRenewBeforeExpiration($renewBeforeExpiration)
```

Set if the domain can be renewed before the expiry date.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$renewBeforeExpiration` |  |


**Returns** `self`

### getIdProtectionStatus

```php
public function getIdProtectionStatus()
```

Get if the domain currently has an active ID Protection product on it.

**Returns** `boolean\|null`

### setIdProtectionStatus

```php
public function setIdProtectionStatus($idProtectionStatus)
```

Set if the domain currently has an active ID Protection poduct on it.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$idProtectionStatus` |  |


**Returns** `self`

### getDnsManagementStatus

```php
public function getDnsManagementStatus()
```

Get if DNS Management (A, AAAA, CNAME, etc., records)
is active on this domain at the registrar.

**Returns** `boolean`

### setDnsManagementStatus

```php
public function setDnsManagementStatus($dnsManagementStatus)
```

Set if DNS Management (A, AAAA, CNAME, etc., records)
is active on this domain at the registrar.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$dnsManagementStatus` |  |


**Returns** `self`

### getEmailForwardingStatus

```php
public function getEmailForwardingStatus()
```

Check if email forwarding is enabled on the domain at the registrar

**Returns** `boolean`

### setEmailForwardingStatus

```php
public function setEmailForwardingStatus($emailForwardingStatus)
```

Set if email forwarding is enabled on the domain at the registrar.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$emailForwardingStatus` |  |


**Returns** `self`

### hasNameservers

```php
public function hasNameservers()
```

Checks if the domain has more than zero nameservers associated with it
that have been added using setNameservers

**Returns** `boolean`

### getNameservers

```php
public function getNameservers()
```

Retrieve the array of nameservers associated with the domain.

**Returns** `array`

### setNameservers

```php
public function setNameservers($nameservers)
```

Set the currently active nameservers for the domain.

Example:
array('ns1' => 'ns1.example.com', 'ns2' => 'ns2.example.com', 'ns3' => 'ns3.example.com')

**Parameters**

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


**Returns** `self`

### hasTransferLock

```php
public function hasTransferLock()
```

Check if the transfer lock state has been set on the domain.

**Returns** `boolean`

### getTransferLock

```php
public function getTransferLock()
```

Check if the transfer lock is enabled on the domain.

**Returns** `boolean\|null`

### setTransferLock

```php
public function setTransferLock($transferLock)
```

Set the transfer lock status on the domain.
True for enabled, false for disabled.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$transferLock` |  |


**Returns** `self`

### getTransferLockExpiryDate

```php
public function getTransferLockExpiryDate()
```

Get the expiry date of the transfer lock.

**Returns** `Carbon\|null`

### setTransferLockExpiryDate

```php
public function setTransferLockExpiryDate(Carbon $transferLockExpiryDate = null)
```

Set the expiry date of the transfer lock using a Carbon object.

Example: Carbon::createFromFormat('Y-m-d', '2018-12-12')

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `Carbon` | `$transferLockExpiryDate` |  |


**Returns** `self`

### getIrtpOptOutStatus

```php
public function getIrtpOptOutStatus()
```

Get if IRTP has been opted out.

**Returns** `boolean\|null`

### setIrtpOptOutStatus

```php
public function setIrtpOptOutStatus($irtpOptOutStatus)
```

Set if IRTP has been opted out of.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$irtpOptOutStatus` |  |


**Returns** `self`

### getIrtpTransferLock

```php
public function getIrtpTransferLock()
```

Get the status of the irtp transfer lock.

**Returns** `boolean\|null`

### setIrtpTransferLock

```php
public function setIrtpTransferLock($irtpTransferLock)
```

Set the state of the irtp transfer lock.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$irtpTransferLock` |  |


**Returns** `self`

### getIrtpTransferLockExpiryDate

```php
public function getIrtpTransferLockExpiryDate()
```

Get the expiry date of the transfer lock.

**Returns** `Carbon\|null`

### setIrtpTransferLockExpiryDate

```php
public function setIrtpTransferLockExpiryDate(Carbon $irtpTransferLockExpiryDate)
```

Set the expiry date of the transfer lock using a Carbon object.

Example: Carbon::createFromFormat('Y-m-d', '2018-12-12')

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `Carbon` | `$irtpTransferLockExpiryDate` |  |


**Returns** `self`

### isContactChangePending

```php
public function isContactChangePending()
```

Check if a contact change is pending on the domain.

**Returns** `boolean\|null`

### setDomainContactChangePending

```php
public function setDomainContactChangePending($domainContactChangePending)
```

Set if a contact change is pending on the domain.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$domainContactChangePending` |  |


**Returns** `self`

### getDomainContactChangeExpiryDate

```php
public function getDomainContactChangeExpiryDate()
```

Get the date that the contact change is to be confirmed by.

**Returns** `Carbon\|null`

### setDomainContactChangeExpiryDate

```php
public function setDomainContactChangeExpiryDate(Carbon $domainContactChangeExpiryDate = null)
```

Set the confirmation deadline that the contact change is to be confirmed by
using a Carbon object.

Example: Carbon::createFromFormat('Y-m-d', '2018-12-12')

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `Carbon` | `$domainContactChangeExpiryDate` |  |


**Returns** `self`

### getPendingSuspension

```php
public function getPendingSuspension()
```

Check if the domain is pending suspension.
A domain will be pending suspension if a new registration has occurred and the
registrant contact has not been confirmed.

**Returns** `boolean\|null`

### setPendingSuspension

```php
public function setPendingSuspension($willDomainSuspend)
```

Set if the domain is pending suspension.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `boolean` | `$willDomainSuspend` |  |


**Returns** `self`

### setIsIrtpEnabled

```php
public function setIsIrtpEnabled($isIrtpEnabled)
```

Set if this domain is subject to IRTP policies.

**Returns** `$this`

### getIsIrtpEnabled

```php
public function getIsIrtpEnabled()
```

Check if this domain is an ICANN tld and subject to IRTP policies.

Alias of self::isIrtpEnabled

**Returns** `bool\|null`

### isIrtpEnabled

```php
public function isIrtpEnabled()
```

Check if this domain is an ICANN tld and subject to IRTP policies.

**Returns** `bool\|null`

### setIrtpVerificationTriggerFields

```php
public function setIrtpVerificationTriggerFields(array $fields = [])
```

Set the fields that trigger IRTP verification when changed.

Example:
array('Registrant' => array('First Name', 'Last Name', 'Organisation Name', 'Email',))

**Parameters**

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


**Returns** `$this`

### getIrtpVerificationTriggerFields

```php
public function getIrtpVerificationTriggerFields()
```

Obtain the fields that trigger IRTP verification.

**Returns** `array`