File tree Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -399,4 +399,12 @@ public function vpnGateways()
399399 {
400400 return (new VpnGatewayClient ($ this ->httpClient ))->auth ($ this ->token );
401401 }
402+
403+ /**
404+ * @return BaseClient
405+ */
406+ public function vpnGatewayUsers ()
407+ {
408+ return (new VpnGatewayUserClient ($ this ->httpClient ))->auth ($ this ->token );
409+ }
402410}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace UKFast \SDK \eCloud \Entities ;
4+
5+ use DateTime ;
6+ use UKFast \SDK \Entity ;
7+
8+ /**
9+ * @property string $id
10+ * @property string $name
11+ * @property string vpnGatewayId
12+ * @property DateTime $createdAt
13+ * @property DateTime $updatedAt
14+ */
15+ class VpnGatewayUser extends Entity
16+ {
17+ protected $ dates = ['createdAt ' , 'updatedAt ' ];
18+
19+ public static $ entityMap = [
20+ 'id ' => 'id ' ,
21+ 'name ' => 'name ' ,
22+ 'vpn_gateway_id ' => 'vpnGatewayId ' ,
23+ 'created_at ' => 'createdAt ' ,
24+ 'updated_at ' => 'updatedAt ' ,
25+ ];
26+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace UKFast \SDK \eCloud ;
4+
5+ use UKFast \SDK \eCloud \Entities \VpnGatewayUser ;
6+ use UKFast \SDK \Entities \ClientEntityInterface ;
7+ use UKFast \SDK \Traits \PageItems ;
8+
9+ class VpnGatewayUserClient extends Client implements ClientEntityInterface
10+ {
11+ use PageItems;
12+
13+ protected $ collectionPath = 'v2/vpn-gateway-users ' ;
14+
15+ public function getEntityMap ()
16+ {
17+ return VpnGatewayUser::$ entityMap ;
18+ }
19+
20+ public function loadEntity ($ data )
21+ {
22+ return new VpnGatewayUser (
23+ $ this ->apiToFriendly ($ data , VpnGatewayUser::$ entityMap )
24+ );
25+ }
26+ }
You can’t perform that action at this time.
0 commit comments