File tree 3 files changed +57
-0
lines changed
3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -375,4 +375,12 @@ public function resourceTiers()
375
375
{
376
376
return (new ResourceTierClient ($ this ->httpClient ))->auth ($ this ->token );
377
377
}
378
+
379
+ /**
380
+ * @return BaseClient
381
+ */
382
+ public function software ()
383
+ {
384
+ return (new SoftwareClient ($ this ->httpClient ))->auth ($ this ->token );
385
+ }
378
386
}
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 int $id
9
+ * @property string $name
10
+ * @property string $platform
11
+ * @property string $license
12
+ */
13
+ class Software extends Entity
14
+ {
15
+ protected $ dates = ['createdAt ' , 'updatedAt ' ];
16
+
17
+ public static $ entityMap = [
18
+ 'id ' => 'id ' ,
19
+ 'name ' => 'name ' ,
20
+ 'platform ' => 'platform ' ,
21
+ 'license ' => 'license ' ,
22
+ ];
23
+ }
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 \Software ;
6
+ use UKFast \SDK \Entities \ClientEntityInterface ;
7
+ use UKFast \SDK \Traits \PageItems ;
8
+
9
+ class SoftwareClient extends Client implements ClientEntityInterface
10
+ {
11
+ use PageItems;
12
+
13
+ protected $ collectionPath = 'v2/software ' ;
14
+
15
+ public function loadEntity ($ data )
16
+ {
17
+ return new Software (
18
+ $ this ->apiToFriendly ($ data , $ this ->getEntityMap ())
19
+ );
20
+ }
21
+
22
+ public function getEntityMap ()
23
+ {
24
+ return Software::$ entityMap ;
25
+ }
26
+ }
You can’t perform that action at this time.
0 commit comments