Total Complexity | 3 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class Notifications implements CloudApi |
||
14 | { |
||
15 | |||
16 | /** @var ClientInterface The API client. */ |
||
17 | protected $client; |
||
18 | |||
19 | /** |
||
20 | * Client constructor. |
||
21 | * |
||
22 | * @param ClientInterface $client |
||
23 | */ |
||
24 | public function __construct(ClientInterface $client) |
||
25 | { |
||
26 | $this->client = $client; |
||
27 | } |
||
28 | /** |
||
29 | * Returns details about a notification. |
||
30 | * |
||
31 | * @return NotificationResponse |
||
32 | */ |
||
33 | public function get($notificationUuid) |
||
34 | { |
||
35 | return new NotificationResponse( |
||
36 | $this->client->request( |
||
|
|||
37 | 'get', |
||
38 | "/notifications/${notificationUuid}" |
||
39 | ) |
||
40 | ); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Returns a list of notifications. |
||
45 | * |
||
46 | * @param string $applicationUuid |
||
47 | * |
||
48 | * @return NotificationsResponse |
||
49 | */ |
||
50 | public function getAll($applicationUuid) |
||
56 | ) |
||
57 | ); |
||
58 | } |
||
60 |