Overview

Namespaces

  • SMSApi
    • Api
      • Action
        • Phonebook
        • Sender
        • Sms
        • User
      • Response
    • Exception
    • Proxy
      • Http

Classes

  • SMSApi\Proxy\Http\AbstractHttp
  • SMSApi\Proxy\Http\Curl
  • SMSApi\Proxy\Http\Native
  • Overview
  • Namespace
  • Class
 1: <?php
 2: 
 3: namespace SMSApi\Api\Action\Sms;
 4: 
 5: use SMSApi\Api\Action\AbstractAction;
 6: use SMSApi\Api\Response\CountableResponse;
 7: use SMSApi\Proxy\Uri;
 8: 
 9: /**
10:  * Class Delete
11:  * @package SMSApi\Api\Action\Sms
12:  *
13:  * @method CountableResponse execute()
14:  */
15: class Delete extends AbstractAction
16: {
17:     /**
18:      * @var int
19:      */
20:     private $id;
21: 
22:     /**
23:      * @param $data
24:      * @return CountableResponse
25:      */
26:     protected function response($data)
27:     {
28:         return new CountableResponse($data);
29:     }
30: 
31:     /**
32:      * @return Uri
33:      */
34:     public function uri() {
35: 
36:         $query = "";
37: 
38:         $query .= $this->paramsLoginToQuery();
39: 
40:         $query .= $this->paramsOther();
41: 
42:         $query .= "&sch_del=" . $this->id;
43: 
44:         return new Uri( $this->proxy->getProtocol(), $this->proxy->getHost(), $this->proxy->getPort(), "/api/sms.do", $query );
45:     }
46: 
47: 
48:     /**
49:      * Set ID of message to delete.
50:      *
51:      * This id was returned after sending message.
52:      *
53:      * @param $id
54:      * @return $this
55:      * @throws \SMSApi\Exception\ActionException
56:      */
57:     public function filterById( $id ) {
58:         $this->id = $id;
59:         return $this;
60:     }
61: 
62:     /**
63:      * @deprecated since v1.0.0
64:      *
65:      * @param $id
66:      * @return $this
67:      */
68:     public function id( $id ) {
69:         return $this->filterById($id);
70:     }
71: 
72: }
73: 
74: 
SMSAPI Api Client API documentation generated by ApiGen