1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Lamoda\OmsClient\V2\Dto; |
6
|
|
|
|
7
|
|
|
final class PoolInfo |
8
|
|
|
{ |
9
|
|
|
public const STATUS_REQUEST_ERROR = 'REQUEST_ERROR'; |
10
|
|
|
public const STATUS_REQUESTED = 'REQUESTED'; |
11
|
|
|
public const STATUS_IN_PROCESS = 'IN_PROCESS'; |
12
|
|
|
public const STATUS_READY = 'READY'; |
13
|
|
|
public const STATUS_CLOSED = 'CLOSED'; |
14
|
|
|
public const STATUS_DELETED = 'DELETED'; |
15
|
|
|
public const STATUS_REJECTED = 'REJECTED'; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* @var string |
19
|
|
|
*/ |
20
|
|
|
private $status; |
21
|
|
|
/** |
22
|
|
|
* @var int |
23
|
|
|
*/ |
24
|
|
|
private $quantity; |
25
|
|
|
/** |
26
|
|
|
* @var int |
27
|
|
|
*/ |
28
|
|
|
private $leftInRegistrar; |
29
|
|
|
/** |
30
|
|
|
* @var string |
31
|
|
|
*/ |
32
|
|
|
private $registrarId; |
33
|
|
|
/** |
34
|
|
|
* @var bool |
35
|
|
|
*/ |
36
|
|
|
private $isRegistrarReady; |
37
|
|
|
/** |
38
|
|
|
* @var int |
39
|
|
|
*/ |
40
|
|
|
private $registrarErrorCount; |
41
|
|
|
/** |
42
|
|
|
* @var int |
43
|
|
|
*/ |
44
|
|
|
private $lastRegistrarErrorTimestamp; |
45
|
|
|
|
46
|
|
|
public function __construct( |
47
|
|
|
string $status, |
48
|
|
|
int $quantity, |
49
|
|
|
int $leftInRegistrar, |
50
|
|
|
string $registrarId, |
51
|
|
|
bool $isRegistrarReady, |
52
|
|
|
int $registrarErrorCount, |
53
|
|
|
int $lastRegistrarErrorTimestamp |
54
|
|
|
) { |
55
|
|
|
$this->status = $status; |
56
|
|
|
$this->quantity = $quantity; |
57
|
|
|
$this->leftInRegistrar = $leftInRegistrar; |
58
|
|
|
$this->registrarId = $registrarId; |
59
|
|
|
$this->isRegistrarReady = $isRegistrarReady; |
60
|
|
|
$this->registrarErrorCount = $registrarErrorCount; |
61
|
|
|
$this->lastRegistrarErrorTimestamp = $lastRegistrarErrorTimestamp; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
public function getStatus(): string |
65
|
|
|
{ |
66
|
|
|
return $this->status; |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
public function getQuantity(): int |
70
|
|
|
{ |
71
|
|
|
return $this->quantity; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
public function getLeftInRegistrar(): int |
75
|
|
|
{ |
76
|
|
|
return $this->leftInRegistrar; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function getRegistrarId(): string |
80
|
|
|
{ |
81
|
|
|
return $this->registrarId; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
public function isRegistrarReady(): bool |
85
|
|
|
{ |
86
|
|
|
return $this->isRegistrarReady; |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
public function getRegistrarErrorCount(): int |
90
|
|
|
{ |
91
|
|
|
return $this->registrarErrorCount; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
public function getLastRegistrarErrorTimestamp(): int |
95
|
|
|
{ |
96
|
|
|
return $this->lastRegistrarErrorTimestamp; |
97
|
|
|
} |
98
|
|
|
} |
99
|
|
|
|