1: <?php
2:
3: namespace SMSApi\Api\Action\Sender;
4:
5: use SMSApi\Api\Action\AbstractAction;
6: use SMSApi\Proxy\Uri;
7:
8: /**
9: * Class Delete
10: * @package SMSApi\Api\Action\Sender
11: */
12: class Delete extends AbstractAction {
13:
14: /**
15: * @param $data
16: * @return \SMSApi\Api\Response\CountableResponse
17: */
18: protected function response( $data ) {
19:
20: return new \SMSApi\Api\Response\CountableResponse( $data );
21: }
22:
23: /**
24: * @return Uri
25: */
26: public function uri() {
27:
28: $query = "";
29:
30: $query .= $this->paramsLoginToQuery();
31:
32: $query .= $this->paramsOther();
33:
34: return new Uri( $this->proxy->getProtocol(), $this->proxy->getHost(), $this->proxy->getPort(), "/api/sender.do", $query );
35: }
36:
37: /**
38: * Set filter by sender name.
39: *
40: * @param $senderName string Sender name do delete
41: * @return $this
42: */
43: public function filterBySenderName( $senderName ) {
44: $this->params[ "delete" ] = $senderName;
45: return $this;
46: }
47:
48: /**
49: * @deprecated since v1.0.0
50: */
51: public function setSender( $senderName ) {
52: return $this->filterBySenderName($senderName);
53: }
54:
55: }
56:
57: