1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of RussianPost SDK package. |
5
|
|
|
* |
6
|
|
|
* © Appwilio (http://appwilio.com), greabock (https://github.com/greabock), JhaoDa (https://github.com/jhaoda) |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
declare(strict_types=1); |
13
|
|
|
|
14
|
|
|
namespace Appwilio\RussianPostSDK\Tracking\Single; |
15
|
|
|
|
16
|
|
|
class CashOnDeliveryEvent |
17
|
|
|
{ |
18
|
|
|
/** @var string */ |
19
|
|
|
private $Number; |
20
|
|
|
|
21
|
|
|
/** @var string */ |
22
|
|
|
private $EventDateTime; |
23
|
|
|
|
24
|
|
|
/** @var string */ |
25
|
|
|
private $EventType; |
26
|
|
|
|
27
|
|
|
/** @var string */ |
28
|
|
|
private $EventName; |
29
|
|
|
|
30
|
|
|
/** @var string */ |
31
|
|
|
private $IndexTo; |
32
|
|
|
|
33
|
|
|
/** @var string */ |
34
|
|
|
private $IndexEvent; |
35
|
|
|
|
36
|
|
|
/** @var string */ |
37
|
|
|
private $SumPaymentForward; |
38
|
|
|
|
39
|
|
|
/** @var string */ |
40
|
|
|
private $CountryEventCode; |
41
|
|
|
|
42
|
|
|
/** @var string */ |
43
|
|
|
private $CountryToCode; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Номер почтового перевода наложенного платежа (Number). |
47
|
|
|
* |
48
|
|
|
* @return string |
49
|
|
|
*/ |
50
|
|
|
public function getNumber(): string |
51
|
|
|
{ |
52
|
|
|
return $this->Number; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Дата и время операции (EventDateTime). |
57
|
|
|
* |
58
|
|
|
* @return \DateTimeImmutable |
59
|
|
|
*/ |
60
|
|
|
public function getPerformedAt(): \DateTimeImmutable |
61
|
|
|
{ |
62
|
|
|
return \DateTimeImmutable::createFromFormat('Y-m-d\TH:i:s.uP', $this->EventDateTime); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* Код операции с наложенным платежом (EventType). |
67
|
|
|
* |
68
|
|
|
* @link https://tracking.pochta.ru/support/dictionaries/event_type |
69
|
|
|
* |
70
|
|
|
* @return string |
71
|
|
|
*/ |
72
|
|
|
public function getEventType(): string |
73
|
|
|
{ |
74
|
|
|
return $this->EventType; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* Название операции (EventName). |
79
|
|
|
* |
80
|
|
|
* @link https://tracking.pochta.ru/support/dictionaries/event_type |
81
|
|
|
* |
82
|
|
|
* @return string |
83
|
|
|
*/ |
84
|
|
|
public function getEventName(): string |
85
|
|
|
{ |
86
|
|
|
return $this->EventName; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* @return string |
91
|
|
|
*/ |
92
|
|
|
public function getIndexTo(): string |
93
|
|
|
{ |
94
|
|
|
return $this->IndexTo; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* @return string |
99
|
|
|
*/ |
100
|
|
|
public function getIndexEvent(): string |
101
|
|
|
{ |
102
|
|
|
return $this->IndexEvent; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
/** |
106
|
|
|
* Сумма наложенного платежа в копейках (SumPaymentForward). |
107
|
|
|
* |
108
|
|
|
* @return int |
109
|
|
|
*/ |
110
|
|
|
public function getPayment(): int |
111
|
|
|
{ |
112
|
|
|
return (int) $this->SumPaymentForward; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @return string |
117
|
|
|
*/ |
118
|
|
|
public function getCountryEventCode(): string |
119
|
|
|
{ |
120
|
|
|
return $this->CountryEventCode; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return string |
125
|
|
|
*/ |
126
|
|
|
public function getCountryToCode(): string |
127
|
|
|
{ |
128
|
|
|
return $this->CountryToCode; |
129
|
|
|
} |
130
|
|
|
} |
131
|
|
|
|