Total Complexity | 11 |
Total Lines | 103 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class SmsUpReportResponseMessage |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $status; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $smsId; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $custom; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $from; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $to; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | private $smsDate; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | private $dlrDate; |
||
45 | |||
46 | public function __construct(array $response) |
||
47 | { |
||
48 | |||
49 | $this->status = $response['status']; |
||
50 | $this->smsId = $response['sms_id']; |
||
51 | $this->from = $response['from']; |
||
52 | $this->to = $response['to']; |
||
53 | $this->custom = isset($response['custom']) ? $response['custom'] : ''; |
||
54 | $this->smsDate = isset($response['sms_date']) ? $response['sms_date'] : ''; |
||
55 | $this->dlrDate = isset($response['dlr_date']) ? $response['dlr_date'] : ''; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return string|null |
||
60 | */ |
||
61 | public function getStatus() |
||
62 | { |
||
63 | return $this->status; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @return string|null |
||
68 | */ |
||
69 | public function getSmsId() |
||
70 | { |
||
71 | return $this->smsId; |
||
72 | } |
||
73 | |||
74 | /** |
||
75 | * @return string|null |
||
76 | */ |
||
77 | public function getCustom() |
||
78 | { |
||
79 | return $this->custom; |
||
80 | } |
||
81 | |||
82 | /** |
||
83 | * @return string|null |
||
84 | */ |
||
85 | public function getFrom() |
||
86 | { |
||
87 | return $this->from; |
||
88 | } |
||
89 | |||
90 | /** |
||
91 | * @return string|null |
||
92 | */ |
||
93 | public function getTo() |
||
94 | { |
||
95 | return $this->to; |
||
96 | } |
||
97 | |||
98 | /** |
||
99 | * @return string|null |
||
100 | */ |
||
101 | public function getSmsDate() |
||
102 | { |
||
103 | return $this->smsDate; |
||
104 | } |
||
105 | |||
106 | /** |
||
107 | * @return string|null |
||
108 | */ |
||
109 | public function getDlrDate() |
||
112 | } |
||
113 | } |