GetICBufferStatusResponse   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 135
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 12
lcom 0
cbo 0
dl 0
loc 135
rs 10
c 0
b 0
f 0

12 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 1
A getOmsId() 0 4 1
A getOrderId() 0 4 1
A getGtin() 0 4 1
A getTotalCodes() 0 4 1
A getUnavailableCodes() 0 4 1
A getLeftInBuffer() 0 4 1
A getPoolInfos() 0 4 1
A setPoolInfos() 0 4 1
A getBufferStatus() 0 4 1
A getRejectionReason() 0 4 1
A setRejectionReason() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lamoda\OmsClient\V2\Dto;
6
7
final class GetICBufferStatusResponse
8
{
9
    public const BUFFER_STATUS_PENDING = 'PENDING';
10
    public const BUFFER_STATUS_ACTIVE = 'ACTIVE';
11
    public const BUFFER_STATUS_EXHAUSTED = 'EXHAUSTED';
12
    public const BUFFER_STATUS_REJECTED = 'REJECTED';
13
    public const BUFFER_STATUS_CLOSED = 'CLOSED';
14
15
    /**
16
     * @var string
17
     */
18
    private $omsId;
19
    /**
20
     * @var string
21
     */
22
    private $orderId;
23
    /**
24
     * @var string
25
     */
26
    private $gtin;
27
    /**
28
     * @var int
29
     */
30
    private $totalCodes;
31
    /**
32
     * @var int
33
     */
34
    private $unavailableCodes;
35
    /**
36
     * @var int
37
     */
38
    private $leftInBuffer;
39
    /**
40
     * @var PoolInfo[]
41
     */
42
    private $poolInfos = [];
43
    /**
44
     * @var string
45
     */
46
    private $bufferStatus;
47
    /**
48
     * @var string | null
49
     */
50
    private $rejectionReason;
51
52
    /**
53
     * GetICBufferStatusResponse constructor.
54
     *
55
     * @param string $omsId
56
     * @param string $orderId
57
     * @param string $gtin
58
     * @param int $totalCodes
59
     * @param int $unavailableCodes
60
     * @param int $leftInBuffer
61
     * @param string $bufferStatus
62
     */
63
    public function __construct(
64
        string $omsId,
65
        string $orderId,
66
        string $gtin,
67
        int $totalCodes,
68
        int $unavailableCodes,
69
        int $leftInBuffer,
70
        string $bufferStatus
71
    ) {
72
        $this->omsId = $omsId;
73
        $this->orderId = $orderId;
74
        $this->gtin = $gtin;
75
        $this->totalCodes = $totalCodes;
76
        $this->unavailableCodes = $unavailableCodes;
77
        $this->leftInBuffer = $leftInBuffer;
78
        $this->bufferStatus = $bufferStatus;
79
    }
80
81
    public function getOmsId(): string
82
    {
83
        return $this->omsId;
84
    }
85
86
    public function getOrderId(): string
87
    {
88
        return $this->orderId;
89
    }
90
91
    public function getGtin(): string
92
    {
93
        return $this->gtin;
94
    }
95
96
    public function getTotalCodes(): int
97
    {
98
        return $this->totalCodes;
99
    }
100
101
    public function getUnavailableCodes(): int
102
    {
103
        return $this->unavailableCodes;
104
    }
105
106
    public function getLeftInBuffer(): int
107
    {
108
        return $this->leftInBuffer;
109
    }
110
111
    /**
112
     * @return PoolInfo[]
113
     */
114
    public function getPoolInfos(): array
115
    {
116
        return $this->poolInfos;
117
    }
118
119
    /**
120
     * @param PoolInfo[] $poolInfos
121
     */
122
    public function setPoolInfos(array $poolInfos): void
123
    {
124
        $this->poolInfos = $poolInfos;
125
    }
126
127
    public function getBufferStatus(): string
128
    {
129
        return $this->bufferStatus;
130
    }
131
132
    public function getRejectionReason(): ?string
133
    {
134
        return $this->rejectionReason;
135
    }
136
137
    public function setRejectionReason(?string $rejectionReason): void
138
    {
139
        $this->rejectionReason = $rejectionReason;
140
    }
141
}
142