| @@ 105-121 (lines=17) @@ | ||
| 102 | return $response->result; |
|
| 103 | } |
|
| 104 | ||
| 105 | public function delete($id) |
|
| 106 | { |
|
| 107 | $url = $this->getURL($this->URL) . '/' . $id; |
|
| 108 | try { |
|
| 109 | $this->makeRequest($url, 'DELETE'); |
|
| 110 | } catch(\Exception $e) { |
|
| 111 | //var_dump($e); |
|
| 112 | } |
|
| 113 | ||
| 114 | $response = $this->getResponse(); |
|
| 115 | ||
| 116 | if ($response->success === true) { |
|
| 117 | return true; |
|
| 118 | } |
|
| 119 | ||
| 120 | return false; |
|
| 121 | } |
|
| 122 | ||
| 123 | private function getURL($url) |
|
| 124 | { |
|
| @@ 37-49 (lines=13) @@ | ||
| 34 | return $this->zone->result->id; |
|
| 35 | } |
|
| 36 | ||
| 37 | public function listOriginCerts() |
|
| 38 | { |
|
| 39 | $id = $this->getZoneId(); |
|
| 40 | $this->makeRequest($this->baseUrl . '?zone_id=' . $id, 'GET', null, true); |
|
| 41 | ||
| 42 | $response = $this->getResponse(); |
|
| 43 | ||
| 44 | if ($response->success !== true) { |
|
| 45 | return false; |
|
| 46 | } |
|
| 47 | ||
| 48 | return $response->result; |
|
| 49 | } |
|
| 50 | ||
| 51 | public function revokeCert($id) |
|
| 52 | { |
|