File tree 3 files changed +60
-1
lines changed
3 files changed +60
-1
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,14 @@ public function iops()
84
84
return (new IopsClient ($ this ->httpClient ))->auth ($ this ->token );
85
85
}
86
86
87
+ /**
88
+ * @return BaseClient
89
+ */
90
+ public function ipAddresses ()
91
+ {
92
+ return (new IpAddressesClient ($ this ->httpClient ))->auth ($ this ->token );
93
+ }
94
+
87
95
/**
88
96
* @return BaseClient
89
97
*/
@@ -92,7 +100,6 @@ public function appliances()
92
100
return (new ApplianceClient ($ this ->httpClient ))->auth ($ this ->token );
93
101
}
94
102
95
-
96
103
/**
97
104
* eCloud v2
98
105
*/
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace UKFast \SDK \eCloud \Entities ;
4
+
5
+ use UKFast \SDK \Entity ;
6
+
7
+ /**
8
+ * @property string $id
9
+ * @property string $name
10
+ * @property string $ipAddress
11
+ * @property string $networkId
12
+ * @property string $createdAt
13
+ * @property string $updatedAt
14
+ */
15
+ class IpAddress extends Entity
16
+ {
17
+ protected $ dates = ['createdAt ' , 'updatedAt ' ];
18
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace UKFast \SDK \eCloud ;
4
+
5
+ use UKFast \SDK \Entities \ClientEntityInterface ;
6
+
7
+ use UKFast \SDK \eCloud \Entities \IpAddress ;
8
+ use UKFast \SDK \Traits \PageItems ;
9
+
10
+ class IpAddressesClient extends Client implements ClientEntityInterface
11
+ {
12
+ use PageItems;
13
+
14
+ private $ collectionPath = "v2/ip-addresses " ;
15
+
16
+ public function getEntityMap ()
17
+ {
18
+ return [
19
+ 'id ' => 'id ' ,
20
+ 'name ' => 'name ' ,
21
+ 'ip_address ' => 'ipAddress ' ,
22
+ 'network_id ' => 'networkId ' ,
23
+ 'created_at ' => 'createdAt ' ,
24
+ 'updated_at ' => 'updatedAt ' ,
25
+ ];
26
+ }
27
+
28
+ public function loadEntity ($ data )
29
+ {
30
+ return new IpAddress (
31
+ $ this ->apiToFriendly ($ data , $ this ->getEntityMap ())
32
+ );
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments