-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDomain.php
More file actions
78 lines (74 loc) · 1.85 KB
/
Domain.php
File metadata and controls
78 lines (74 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
namespace Dnsimple\Struct;
/**
* Represents a Domain.
*
* @see https://developer.dnsimple.com/v2/domains/
* @package Dnsimple\Struct
*/
class Domain
{
/**
* @var int The domain ID in DNSimple
*/
public $id;
/**
* @var int The associated account ID in DNSimple
*/
public $accountId;
/**
* @var int|null The associated registrant (contact) ID in DNSimple
*/
public $registrantId;
/**
* @var string The domain name
*/
public $name;
/**
* @var string The domain unicode name
*/
public $unicodeName;
/**
* @var string The domain state
*/
public $state;
/**
* @var bool True if the domain is set to auto-renew, false otherwise
*/
public $autoRenew;
/**
* @var bool True if the domain WHOIS privacy is enabled, false otherwise
*/
public $privateWhois;
/**
* @var bool True if the domain trustee is enabled, false otherwise
*/
public $trustee;
/**
* @var string|null The timestamp when domain will expire
*/
public $expiresAt;
/**
* @var string When the domain was created in DNSimple
*/
public $createdAt;
/**
* @var string When the domain was last updated in DNSimple
*/
public $updatedAt;
public function __construct($data)
{
$this->id = $data->id;
$this->accountId = $data->account_id;
$this->registrantId = $data->registrant_id;
$this->name = $data->name;
$this->unicodeName = $data->unicode_name;
$this->state = $data->state;
$this->autoRenew = $data->auto_renew;
$this->privateWhois = $data->private_whois;
$this->trustee = $data->trustee;
$this->expiresAt = $data->expires_at;
$this->createdAt = $data->created_at;
$this->updatedAt = $data->updated_at;
}
}