| Total Complexity | 4 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Response extends \UAPAY\Response |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | protected $id; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | protected $data; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Handle decoded JSON |
||
| 22 | * |
||
| 23 | * @throws Exception\JSON |
||
| 24 | */ |
||
| 25 | protected function json_handle() |
||
| 26 | { |
||
| 27 | parent::json_handle(); |
||
| 28 | |||
| 29 | if (!isset($this->json['data']['id'])) |
||
| 30 | { |
||
| 31 | throw new Exception\JSON('data does not contain the id field!'); |
||
| 32 | } |
||
| 33 | |||
| 34 | $this->id = $this->json['data']['id']; |
||
| 35 | |||
| 36 | $this->data = $this->json['data']; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get session id |
||
| 41 | * |
||
| 42 | * @return string id session |
||
| 43 | */ |
||
| 44 | public function id() |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Get info about order |
||
| 51 | * |
||
| 52 | * @return array data |
||
| 53 | */ |
||
| 54 | public function data() |
||
| 59 |