| @@ 86-95 (lines=10) @@ | ||
| 83 | * |
|
| 84 | * @return array |
|
| 85 | */ |
|
| 86 | public function open($id) |
|
| 87 | { |
|
| 88 | return $this->api->request('PUT', '/notifications/'.$id, [ |
|
| 89 | 'Authorization' => 'Basic '.$this->api->getConfig()->getApplicationAuthKey(), |
|
| 90 | 'Content-Type' => 'application/json', |
|
| 91 | ], json_encode([ |
|
| 92 | 'app_id' => $this->api->getConfig()->getApplicationId(), |
|
| 93 | 'opened' => true, |
|
| 94 | ])); |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * Cancel notification. |
|
| @@ 106-114 (lines=9) @@ | ||
| 103 | * |
|
| 104 | * @return array |
|
| 105 | */ |
|
| 106 | public function cancel($id) |
|
| 107 | { |
|
| 108 | return $this->api->request('DELETE', '/notifications/'.$id, [ |
|
| 109 | 'Authorization' => 'Basic '.$this->api->getConfig()->getApplicationAuthKey(), |
|
| 110 | 'Content-Type' => 'application/json', |
|
| 111 | ], json_encode([ |
|
| 112 | 'app_id' => $this->api->getConfig()->getApplicationId(), |
|
| 113 | ])); |
|
| 114 | } |
|
| 115 | ||
| 116 | protected function resolve(array $data) |
|
| 117 | { |
|