Completed
Branch master (d0d40f)
by Artem
02:44
created

DomainApi::getList()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 6
ccs 0
cts 0
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
//----------------------------------------------------------------------
4
//
5
//  Copyright (C) 2015-2016 Artem Rodygin
6
//
7
//  This file is part of Linode API Client Library for PHP.
8
//
9
//  You should have received a copy of the MIT License along with
10
//  the library. If not, see <http://opensource.org/licenses/MIT>.
11
//
12
//----------------------------------------------------------------------
13
14
namespace Linode;
15
16
/**
17
 * This class is autogenerated.
18
 *
19
 * @version Linode API v3.3
20
 */
21
class DomainApi extends BaseLinodeApi
22
{
23
    /**
24
     * Create a domain record.
25
     *
26
     * @param string $Domain           [required] The zone's name
27
     * @param string $Type             [required] master or slave
28
     * @param string $SOA_Email        [optional] Required when type=master
29
     * @param string $Description      [optional] Currently undisplayed.
30
     * @param int    $Refresh_sec      [optional] 
31
     * @param int    $Retry_sec        [optional] 
32
     * @param int    $Expire_sec       [optional] 
33
     * @param int    $TTL_sec          [optional] 
34
     * @param string $lpm_displayGroup [optional] Display group in the Domain list inside the Linode DNS Manager
35
     * @param int    $status           [optional] 0, 1, or 2 (disabled, active, edit mode)
36
     * @param string $master_ips       [optional] When type=slave, the zone's master DNS servers list, semicolon separated 
37
     * @param string $axfr_ips         [optional] IP addresses allowed to AXFR the entire zone, semicolon separated
38
     *
39
     * @return array
40
     */
41
    public function create($Domain, $Type, $SOA_Email = null, $Description = null, $Refresh_sec = null, $Retry_sec = null, $Expire_sec = null, $TTL_sec = null, $lpm_displayGroup = null, $status = null, $master_ips = null, $axfr_ips = null)
42
    {
43
        return $this->call('domain.create', [
44
            'Domain'           => $Domain,
45
            'Type'             => $Type,
46
            'SOA_Email'        => $SOA_Email,
47
            'Description'      => $Description,
48
            'Refresh_sec'      => $Refresh_sec,
49
            'Retry_sec'        => $Retry_sec,
50
            'Expire_sec'       => $Expire_sec,
51
            'TTL_sec'          => $TTL_sec,
52
            'lpm_displayGroup' => $lpm_displayGroup,
53
            'status'           => $status,
54
            'master_ips'       => $master_ips,
55
            'axfr_ips'         => $axfr_ips,
56
        ]);
57
    }
58
59
    /**
60
     * @param int $DomainID [required] 
61
     *
62
     * @return array
63
     */
64
    public function delete($DomainID)
65
    {
66
        return $this->call('domain.delete', [
67
            'DomainID' => $DomainID,
68
        ]);
69
    }
70
71
    /**
72
     * Lists domains you have access to.
73
     *
74
     * @param int $DomainID [optional] Limits the list to the specified DomainID
75
     *
76
     * @return array
77
     */
78
    public function getList($DomainID = null)
79
    {
80
        return $this->call('domain.list', [
81
            'DomainID' => $DomainID,
82
        ]);
83
    }
84
85
    /**
86
     * Update a domain record.
87
     *
88
     * @param int    $DomainID         [required] 
89
     * @param string $Domain           [optional] The zone's name
90
     * @param string $Type             [optional] master or slave
91
     * @param string $SOA_Email        [optional] Required when type=master
92
     * @param string $Description      [optional] Currently undisplayed.
93
     * @param int    $Refresh_sec      [optional] 
94
     * @param int    $Retry_sec        [optional] 
95
     * @param int    $Expire_sec       [optional] 
96
     * @param int    $TTL_sec          [optional] 
97
     * @param string $lpm_displayGroup [optional] Display group in the Domain list inside the Linode DNS Manager
98
     * @param int    $status           [optional] 0, 1, or 2 (disabled, active, edit mode)
99
     * @param string $master_ips       [optional] When type=slave, the zone's master DNS servers list, semicolon separated 
100
     * @param string $axfr_ips         [optional] IP addresses allowed to AXFR the entire zone, semicolon separated
101
     *
102
     * @return array
103
     */
104
    public function update($DomainID, $Domain = null, $Type = null, $SOA_Email = null, $Description = null, $Refresh_sec = null, $Retry_sec = null, $Expire_sec = null, $TTL_sec = null, $lpm_displayGroup = null, $status = null, $master_ips = null, $axfr_ips = null)
105
    {
106
        return $this->call('domain.update', [
107
            'DomainID'         => $DomainID,
108
            'Domain'           => $Domain,
109
            'Type'             => $Type,
110
            'SOA_Email'        => $SOA_Email,
111
            'Description'      => $Description,
112
            'Refresh_sec'      => $Refresh_sec,
113
            'Retry_sec'        => $Retry_sec,
114
            'Expire_sec'       => $Expire_sec,
115
            'TTL_sec'          => $TTL_sec,
116
            'lpm_displayGroup' => $lpm_displayGroup,
117
            'status'           => $status,
118
            'master_ips'       => $master_ips,
119
            'axfr_ips'         => $axfr_ips,
120
        ]);
121
    }
122
}
123