1 | <?php |
||
7 | class XMLRequest extends Request |
||
8 | { |
||
9 | public static function getAllowedMethods() |
||
20 | |||
21 | /** |
||
22 | * @param string $smsId |
||
23 | * @return array|null |
||
24 | */ |
||
25 | public function cancel($smsId) |
||
29 | |||
30 | /** |
||
31 | * @param string $coupon |
||
32 | * @param bool $markAsUsed |
||
33 | * @param null|string $phone |
||
34 | * @return array|null |
||
35 | */ |
||
36 | public function checkCoupon($coupon, $markAsUsed = true, $phone = null) |
||
47 | |||
48 | /** |
||
49 | * @param string $dateFrom |
||
50 | * @param string $dateTo |
||
51 | * @param null|string $source |
||
52 | * @return array|null |
||
53 | */ |
||
54 | public function getReportBySource($dateFrom, $dateTo, $source = null) |
||
55 | { |
||
56 | return $this->exec( |
||
57 | 'report', |
||
58 | [ |
||
59 | 'start' => $dateFrom, |
||
60 | 'stop' => $dateTo, |
||
61 | 'source' => $source, |
||
62 | ] |
||
63 | ); |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @param string $smsId |
||
68 | * @return array|null |
||
69 | */ |
||
70 | public function getReportBySms($smsId) |
||
74 | |||
75 | /** |
||
76 | * @param string $dateFrom |
||
77 | * @param string $dateTo |
||
78 | * @param null|string $number |
||
79 | * @return array|null |
||
80 | */ |
||
81 | public function getReportByNumber($dateFrom , $dateTo, $number = null) |
||
90 | |||
91 | /** |
||
92 | * @return array|null |
||
93 | */ |
||
94 | public function getBalance() |
||
98 | |||
99 | /** |
||
100 | * @param string $action |
||
101 | * @return string |
||
102 | */ |
||
103 | public function makeEndPoint($action) |
||
107 | |||
108 | /** |
||
109 | * @param array $requestBody |
||
110 | * @return mixed |
||
111 | */ |
||
112 | protected function formatRequestBody(array $requestBody) |
||
116 | |||
117 | /** |
||
118 | * Parses XML from response and returns it as an array |
||
119 | * |
||
120 | * @param string $response |
||
121 | * @return array |
||
122 | */ |
||
123 | protected function parseResponse($response) |
||
128 | } |