1 | <?php |
||
7 | class SendResponse extends AbstractResponse |
||
8 | { |
||
9 | private const RECIPIENT_ID = 'recipient_id'; |
||
10 | private const MESSAGE_ID = 'message_id'; |
||
11 | private const ATTACHMENT_ID = 'attachment_id'; |
||
12 | |||
13 | private const ERROR = 'error'; |
||
14 | private const ERROR_MESSAGE = 'message'; |
||
15 | private const ERROR_TYPE = 'type'; |
||
16 | private const ERROR_CODE = 'code'; |
||
17 | private const ERROR_SUBCODE = 'error_subcode'; |
||
18 | private const ERROR_FBTRACE_ID = 'fbtrace_id'; |
||
19 | |||
20 | /** |
||
21 | * @var string|null |
||
22 | */ |
||
23 | protected $recipientId; |
||
24 | |||
25 | /** |
||
26 | * @var string|null |
||
27 | */ |
||
28 | protected $messageId; |
||
29 | |||
30 | /** |
||
31 | * @var string|null |
||
32 | */ |
||
33 | protected $attachmentId; |
||
34 | |||
35 | /** |
||
36 | * @var string|null |
||
37 | */ |
||
38 | protected $errorMessage; |
||
39 | |||
40 | /** |
||
41 | * @var string|null |
||
42 | */ |
||
43 | protected $errorType; |
||
44 | |||
45 | /** |
||
46 | * @var int|null |
||
47 | */ |
||
48 | protected $errorCode; |
||
49 | |||
50 | /** |
||
51 | * @var int|null |
||
52 | */ |
||
53 | protected $errorSubcode; |
||
54 | |||
55 | /** |
||
56 | * @var string|null |
||
57 | */ |
||
58 | protected $errorFbtraceId; |
||
59 | |||
60 | 10 | protected function parseResponse(array $response): void |
|
68 | |||
69 | 10 | private function hasError(array $response): bool |
|
83 | |||
84 | 9 | public function getRecipientId(): ?string |
|
88 | |||
89 | 8 | public function getMessageId(): ?string |
|
93 | |||
94 | 4 | public function getAttachmentId(): ?string |
|
98 | |||
99 | 3 | public function getErrorMessage(): ?string |
|
103 | |||
104 | 3 | public function getErrorType(): ?string |
|
108 | |||
109 | 3 | public function getErrorCode(): ?int |
|
113 | |||
114 | 3 | public function getErrorSubcode(): ?int |
|
118 | |||
119 | 3 | public function getErrorFbtraceId(): ?string |
|
123 | } |
||
124 |