|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of PHP CS Fixer. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Fabien Potencier <[email protected]> |
|
7
|
|
|
* Dariusz Rumiński <[email protected]> |
|
8
|
|
|
* |
|
9
|
|
|
* This source file is subject to the MIT license that is bundled |
|
10
|
|
|
* with this source code in the file LICENSE. |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
namespace Etrias\EwarehousingConnector\Response; |
|
14
|
|
|
|
|
15
|
|
|
use DateTime; |
|
16
|
|
|
use Etrias\EwarehousingConnector\Types\Address; |
|
17
|
|
|
use Etrias\EwarehousingConnector\Types\OrderLine; |
|
18
|
|
|
|
|
19
|
|
|
class OrderResponse |
|
20
|
|
|
{ |
|
21
|
|
|
/** @var string */ |
|
22
|
|
|
protected $reference; |
|
23
|
|
|
|
|
24
|
|
|
/** @var DateTime */ |
|
25
|
|
|
protected $date; |
|
26
|
|
|
|
|
27
|
|
|
/** @var string */ |
|
28
|
|
|
protected $shipped; |
|
29
|
|
|
|
|
30
|
|
|
/** @var string */ |
|
31
|
|
|
protected $status; |
|
32
|
|
|
|
|
33
|
|
|
/** @var string */ |
|
34
|
|
|
protected $statusCode; |
|
35
|
|
|
|
|
36
|
|
|
/** @var Address */ |
|
37
|
|
|
protected $deliveryAddress; |
|
38
|
|
|
|
|
39
|
|
|
/** @var OrderLine[] */ |
|
40
|
|
|
protected $orderLines = []; |
|
41
|
|
|
|
|
42
|
|
|
/** @var string */ |
|
43
|
|
|
protected $tracking; |
|
44
|
|
|
|
|
45
|
|
|
/** @var string */ |
|
46
|
|
|
protected $shippingMethod; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @return string |
|
50
|
|
|
*/ |
|
51
|
|
|
public function getReference() |
|
52
|
|
|
{ |
|
53
|
|
|
return $this->reference; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* @param string $reference |
|
58
|
|
|
* |
|
59
|
|
|
* @return OrderResponse |
|
60
|
|
|
*/ |
|
61
|
|
|
public function setReference($reference) |
|
62
|
|
|
{ |
|
63
|
|
|
$this->reference = $reference; |
|
64
|
|
|
|
|
65
|
|
|
return $this; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* @return DateTime |
|
70
|
|
|
*/ |
|
71
|
|
|
public function getDate() |
|
72
|
|
|
{ |
|
73
|
|
|
return $this->date; |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
/** |
|
77
|
|
|
* @param DateTime $date |
|
78
|
|
|
* |
|
79
|
|
|
* @return OrderResponse |
|
80
|
|
|
*/ |
|
81
|
|
|
public function setDate($date) |
|
82
|
|
|
{ |
|
83
|
|
|
$this->date = $date; |
|
84
|
|
|
|
|
85
|
|
|
return $this; |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
/** |
|
89
|
|
|
* @return string |
|
90
|
|
|
*/ |
|
91
|
|
|
public function getShipped() |
|
92
|
|
|
{ |
|
93
|
|
|
return $this->shipped; |
|
94
|
|
|
} |
|
95
|
|
|
|
|
96
|
|
|
/** |
|
97
|
|
|
* @param string $shipped |
|
98
|
|
|
* |
|
99
|
|
|
* @return OrderResponse |
|
100
|
|
|
*/ |
|
101
|
|
|
public function setShipped($shipped) |
|
102
|
|
|
{ |
|
103
|
|
|
$this->shipped = $shipped; |
|
104
|
|
|
|
|
105
|
|
|
return $this; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* @return string |
|
110
|
|
|
*/ |
|
111
|
|
|
public function getStatus() |
|
112
|
|
|
{ |
|
113
|
|
|
return $this->status; |
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
/** |
|
117
|
|
|
* @param string $status |
|
118
|
|
|
* |
|
119
|
|
|
* @return OrderResponse |
|
120
|
|
|
*/ |
|
121
|
|
|
public function setStatus($status) |
|
122
|
|
|
{ |
|
123
|
|
|
$this->status = $status; |
|
124
|
|
|
|
|
125
|
|
|
return $this; |
|
126
|
|
|
} |
|
127
|
|
|
|
|
128
|
|
|
/** |
|
129
|
|
|
* @return string |
|
130
|
|
|
*/ |
|
131
|
|
|
public function getStatusCode() |
|
132
|
|
|
{ |
|
133
|
|
|
return $this->statusCode; |
|
134
|
|
|
} |
|
135
|
|
|
|
|
136
|
|
|
/** |
|
137
|
|
|
* @param string $statusCode |
|
138
|
|
|
* |
|
139
|
|
|
* @return OrderResponse |
|
140
|
|
|
*/ |
|
141
|
|
|
public function setStatusCode($statusCode) |
|
142
|
|
|
{ |
|
143
|
|
|
$this->statusCode = $statusCode; |
|
144
|
|
|
|
|
145
|
|
|
return $this; |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
/** |
|
149
|
|
|
* @return Address |
|
150
|
|
|
*/ |
|
151
|
|
|
public function getDeliveryAddress() |
|
152
|
|
|
{ |
|
153
|
|
|
return $this->deliveryAddress; |
|
154
|
|
|
} |
|
155
|
|
|
|
|
156
|
|
|
/** |
|
157
|
|
|
* @param Address $deliveryAddress |
|
158
|
|
|
* |
|
159
|
|
|
* @return OrderResponse |
|
160
|
|
|
*/ |
|
161
|
|
|
public function setDeliveryAddress($deliveryAddress) |
|
162
|
|
|
{ |
|
163
|
|
|
$this->deliveryAddress = $deliveryAddress; |
|
164
|
|
|
|
|
165
|
|
|
return $this; |
|
166
|
|
|
} |
|
167
|
|
|
|
|
168
|
|
|
/** |
|
169
|
|
|
* @return OrderLine[] |
|
170
|
|
|
*/ |
|
171
|
|
|
public function getOrderLines() |
|
172
|
|
|
{ |
|
173
|
|
|
return $this->orderLines; |
|
174
|
|
|
} |
|
175
|
|
|
|
|
176
|
|
|
/** |
|
177
|
|
|
* @param OrderLine[] $orderLines |
|
178
|
|
|
* |
|
179
|
|
|
* @return OrderResponse |
|
180
|
|
|
*/ |
|
181
|
|
|
public function setOrderLines($orderLines) |
|
182
|
|
|
{ |
|
183
|
|
|
$this->orderLines = $orderLines; |
|
184
|
|
|
|
|
185
|
|
|
return $this; |
|
186
|
|
|
} |
|
187
|
|
|
|
|
188
|
|
|
/** |
|
189
|
|
|
* @return string |
|
190
|
|
|
*/ |
|
191
|
|
|
public function getTracking() |
|
192
|
|
|
{ |
|
193
|
|
|
return $this->tracking; |
|
194
|
|
|
} |
|
195
|
|
|
|
|
196
|
|
|
/** |
|
197
|
|
|
* @param string $tracking |
|
198
|
|
|
* |
|
199
|
|
|
* @return OrderResponse |
|
200
|
|
|
*/ |
|
201
|
|
|
public function setTracking($tracking) |
|
202
|
|
|
{ |
|
203
|
|
|
$this->tracking = $tracking; |
|
204
|
|
|
|
|
205
|
|
|
return $this; |
|
206
|
|
|
} |
|
207
|
|
|
|
|
208
|
|
|
/** |
|
209
|
|
|
* @return string |
|
210
|
|
|
*/ |
|
211
|
|
|
public function getShippingMethod() |
|
212
|
|
|
{ |
|
213
|
|
|
return $this->shippingMethod; |
|
214
|
|
|
} |
|
215
|
|
|
|
|
216
|
|
|
/** |
|
217
|
|
|
* @param string $shippingMethod |
|
218
|
|
|
* |
|
219
|
|
|
* @return OrderResponse |
|
220
|
|
|
*/ |
|
221
|
|
|
public function setShippingMethod($shippingMethod) |
|
222
|
|
|
{ |
|
223
|
|
|
$this->shippingMethod = $shippingMethod; |
|
224
|
|
|
|
|
225
|
|
|
return $this; |
|
226
|
|
|
} |
|
227
|
|
|
} |
|
228
|
|
|
|