File tree 2 files changed +40
-2
lines changed
2 files changed +40
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
class GeneralInfo extends \PleskX \Api \Struct
7
7
{
8
+ /** @var string */
9
+ public $ creationDate ;
10
+
8
11
/** @var string */
9
12
public $ name ;
10
13
11
14
/** @var string */
12
- public $ guid ;
15
+ public $ asciiName ;
16
+
17
+ /** @var string */
18
+ public $ status ;
13
19
14
20
/** @var int */
15
21
public $ realSize ;
16
22
23
+ /** @var int */
24
+ public $ ownerId ;
25
+
26
+ /** @var array */
27
+ public $ ipAddresses = [];
28
+
29
+ /** @var string */
30
+ public $ guid ;
31
+
32
+ /** @var string */
33
+ public $ vendorGuid ;
34
+
35
+ /** @var string */
36
+ public $ description ;
37
+
38
+ /** @var string */
39
+ public $ adminDescription ;
40
+
17
41
public function __construct ($ apiResponse )
18
42
{
19
43
$ this ->_initScalarProperties ($ apiResponse , [
44
+ ['cr_date ' => 'creationDate ' ],
20
45
'name ' ,
21
- 'guid ' ,
46
+ 'ascii-name ' ,
47
+ 'status ' ,
22
48
'real_size ' ,
49
+ 'owner-id ' ,
50
+ 'guid ' ,
51
+ 'vendor-guid ' ,
52
+ 'description ' ,
53
+ 'admin-description ' ,
23
54
]);
55
+
56
+ foreach ($ apiResponse ->dns_ip_address as $ ip ) {
57
+ $ this ->ipAddresses [] = (string ) $ ip ;
58
+ }
24
59
}
25
60
}
Original file line number Diff line number Diff line change @@ -179,6 +179,9 @@ public function testGet()
179
179
180
180
$ this ->assertNotEmpty ($ webspaceInfo ->name );
181
181
$ this ->assertEquals (0 , $ webspaceInfo ->realSize );
182
+ $ this ->assertEquals ($ webspaceInfo ->name , $ webspaceInfo ->asciiName );
183
+ $ this ->assertIsArray ($ webspaceInfo ->ipAddresses );
184
+ $ this ->assertEquals (36 , strlen ($ webspaceInfo ->guid ));
182
185
183
186
static ::$ _client ->webspace ()->delete ('id ' , $ webspace ->id );
184
187
}
You can’t perform that action at this time.
0 commit comments