|
1
|
|
|
<?php |
|
2
|
|
|
/* |
|
3
|
|
|
* This file is part of the MailChimpEcommerceBundle package. |
|
4
|
|
|
* |
|
5
|
|
|
* Copyright (c) 2017 kevin92dev.es |
|
6
|
|
|
* |
|
7
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
8
|
|
|
* file that was distributed with this source code. |
|
9
|
|
|
* |
|
10
|
|
|
* Feel free to edit as you please, and have fun. |
|
11
|
|
|
* |
|
12
|
|
|
* @author Kevin Murillo <[email protected]> |
|
13
|
|
|
*/ |
|
14
|
|
|
|
|
15
|
|
|
namespace Kevin92dev\MailChimpEcommerceBundle\Entities; |
|
16
|
|
|
|
|
17
|
|
|
class Order |
|
18
|
|
|
{ |
|
19
|
|
|
/** |
|
20
|
|
|
* A unique identifier for the order. |
|
21
|
|
|
* |
|
22
|
|
|
* @var string |
|
23
|
|
|
*/ |
|
24
|
|
|
private $id; |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* Information about a specific customer. This information will update any existing customer. |
|
28
|
|
|
* If the customer doesn’t exist in the store, a new customer will be created. |
|
29
|
|
|
* |
|
30
|
|
|
* @var Customer |
|
31
|
|
|
*/ |
|
32
|
|
|
private $customer; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* A string that uniquely identifies the campaign for an order. |
|
36
|
|
|
* |
|
37
|
|
|
* @var string |
|
38
|
|
|
*/ |
|
39
|
|
|
private $campaignId; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* The URL for the page where the buyer landed when entering the shop. |
|
43
|
|
|
* |
|
44
|
|
|
* @var string |
|
45
|
|
|
*/ |
|
46
|
|
|
private $landingSite; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* The order status. For example: refunded, processing, cancelled, etc. |
|
50
|
|
|
* |
|
51
|
|
|
* @var string |
|
52
|
|
|
*/ |
|
53
|
|
|
private $financialStatus; |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* The fulfillment status for the order. For example: partial, fulfilled, etc. |
|
57
|
|
|
* |
|
58
|
|
|
* @var string |
|
59
|
|
|
*/ |
|
60
|
|
|
private $fulfillmentStatus; |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* The three-letter ISO 4217 code for the currency that the store accepts. |
|
64
|
|
|
* |
|
65
|
|
|
* @var string |
|
66
|
|
|
*/ |
|
67
|
|
|
private $currencyCode; |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* The total for the order. |
|
71
|
|
|
* |
|
72
|
|
|
* @var float |
|
73
|
|
|
*/ |
|
74
|
|
|
private $orderTotal; |
|
75
|
|
|
|
|
76
|
|
|
/** |
|
77
|
|
|
* The tax total for the order. |
|
78
|
|
|
* |
|
79
|
|
|
* @var float |
|
80
|
|
|
*/ |
|
81
|
|
|
private $taxTotal; |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* The shipping total for the order. |
|
85
|
|
|
* |
|
86
|
|
|
* @var float |
|
87
|
|
|
*/ |
|
88
|
|
|
private $shippingTotal; |
|
89
|
|
|
|
|
90
|
|
|
/** |
|
91
|
|
|
* The MailChimp tracking code for the order. Uses the ‘mc_tc’ parameter in E-Commerce tracking URLs. |
|
92
|
|
|
* |
|
93
|
|
|
* @var string |
|
94
|
|
|
*/ |
|
95
|
|
|
private $trackingCode; |
|
96
|
|
|
|
|
97
|
|
|
/** |
|
98
|
|
|
* The date and time the order was processed. |
|
99
|
|
|
* |
|
100
|
|
|
* @var string |
|
101
|
|
|
*/ |
|
102
|
|
|
private $processedAtForeign; |
|
103
|
|
|
|
|
104
|
|
|
/** |
|
105
|
|
|
* The date and time the order was cancelled. |
|
106
|
|
|
* |
|
107
|
|
|
* @var string |
|
108
|
|
|
*/ |
|
109
|
|
|
private $cancelledAtForeign; |
|
110
|
|
|
|
|
111
|
|
|
/** |
|
112
|
|
|
* The date and time the order was updated. |
|
113
|
|
|
* |
|
114
|
|
|
* @var string |
|
115
|
|
|
*/ |
|
116
|
|
|
private $updatedAtForeign; |
|
117
|
|
|
|
|
118
|
|
|
/** |
|
119
|
|
|
* The shipping address for the order. |
|
120
|
|
|
* |
|
121
|
|
|
* @var Address |
|
122
|
|
|
*/ |
|
123
|
|
|
private $shippingAddress; |
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* The billing address for the order. |
|
127
|
|
|
* |
|
128
|
|
|
* @var Address |
|
129
|
|
|
*/ |
|
130
|
|
|
private $billingAddress; |
|
131
|
|
|
|
|
132
|
|
|
/** |
|
133
|
|
|
* An array of the order’s line items. |
|
134
|
|
|
* |
|
135
|
|
|
* @var array |
|
136
|
|
|
*/ |
|
137
|
|
|
private $orderLines; |
|
138
|
|
|
|
|
139
|
|
|
/** |
|
140
|
|
|
* @return string |
|
141
|
|
|
*/ |
|
142
|
|
|
public function getId() |
|
143
|
|
|
{ |
|
144
|
|
|
return $this->id; |
|
145
|
|
|
} |
|
146
|
|
|
|
|
147
|
|
|
/** |
|
148
|
|
|
* @param string $id |
|
149
|
|
|
*/ |
|
150
|
|
|
public function setId($id) |
|
151
|
|
|
{ |
|
152
|
|
|
$this->id = $id; |
|
153
|
|
|
} |
|
154
|
|
|
|
|
155
|
|
|
/** |
|
156
|
|
|
* @return Customer |
|
157
|
|
|
*/ |
|
158
|
|
|
public function getCustomer() |
|
159
|
|
|
{ |
|
160
|
|
|
return $this->customer; |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
/** |
|
164
|
|
|
* @param Customer $customer |
|
165
|
|
|
*/ |
|
166
|
|
|
public function setCustomer($customer) |
|
167
|
|
|
{ |
|
168
|
|
|
$this->customer = $customer; |
|
169
|
|
|
} |
|
170
|
|
|
|
|
171
|
|
|
/** |
|
172
|
|
|
* @return string |
|
173
|
|
|
*/ |
|
174
|
|
|
public function getCampaignId() |
|
175
|
|
|
{ |
|
176
|
|
|
return $this->campaignId; |
|
177
|
|
|
} |
|
178
|
|
|
|
|
179
|
|
|
/** |
|
180
|
|
|
* @param string $campaignId |
|
181
|
|
|
*/ |
|
182
|
|
|
public function setCampaignId($campaignId) |
|
183
|
|
|
{ |
|
184
|
|
|
$this->campaignId = $campaignId; |
|
185
|
|
|
} |
|
186
|
|
|
|
|
187
|
|
|
/** |
|
188
|
|
|
* @return string |
|
189
|
|
|
*/ |
|
190
|
|
|
public function getLandingSite() |
|
191
|
|
|
{ |
|
192
|
|
|
return $this->landingSite; |
|
193
|
|
|
} |
|
194
|
|
|
|
|
195
|
|
|
/** |
|
196
|
|
|
* @param string $landingSite |
|
197
|
|
|
*/ |
|
198
|
|
|
public function setLandingSite($landingSite) |
|
199
|
|
|
{ |
|
200
|
|
|
$this->landingSite = $landingSite; |
|
201
|
|
|
} |
|
202
|
|
|
|
|
203
|
|
|
/** |
|
204
|
|
|
* @return string |
|
205
|
|
|
*/ |
|
206
|
|
|
public function getFinancialStatus() |
|
207
|
|
|
{ |
|
208
|
|
|
return $this->financialStatus; |
|
209
|
|
|
} |
|
210
|
|
|
|
|
211
|
|
|
/** |
|
212
|
|
|
* @param string $financialStatus |
|
213
|
|
|
*/ |
|
214
|
|
|
public function setFinancialStatus($financialStatus) |
|
215
|
|
|
{ |
|
216
|
|
|
$this->financialStatus = $financialStatus; |
|
217
|
|
|
} |
|
218
|
|
|
|
|
219
|
|
|
/** |
|
220
|
|
|
* @return string |
|
221
|
|
|
*/ |
|
222
|
|
|
public function getFulfillmentStatus() |
|
223
|
|
|
{ |
|
224
|
|
|
return $this->fulfillmentStatus; |
|
225
|
|
|
} |
|
226
|
|
|
|
|
227
|
|
|
/** |
|
228
|
|
|
* @param string $fulfillmentStatus |
|
229
|
|
|
*/ |
|
230
|
|
|
public function setFulfillmentStatus($fulfillmentStatus) |
|
231
|
|
|
{ |
|
232
|
|
|
$this->fulfillmentStatus = $fulfillmentStatus; |
|
233
|
|
|
} |
|
234
|
|
|
|
|
235
|
|
|
/** |
|
236
|
|
|
* @return string |
|
237
|
|
|
*/ |
|
238
|
|
|
public function getCurrencyCode() |
|
239
|
|
|
{ |
|
240
|
|
|
return $this->currencyCode; |
|
241
|
|
|
} |
|
242
|
|
|
|
|
243
|
|
|
/** |
|
244
|
|
|
* @param string $currencyCode |
|
245
|
|
|
*/ |
|
246
|
|
|
public function setCurrencyCode($currencyCode) |
|
247
|
|
|
{ |
|
248
|
|
|
$this->currencyCode = $currencyCode; |
|
249
|
|
|
} |
|
250
|
|
|
|
|
251
|
|
|
/** |
|
252
|
|
|
* @return float |
|
253
|
|
|
*/ |
|
254
|
|
|
public function getOrderTotal() |
|
255
|
|
|
{ |
|
256
|
|
|
return $this->orderTotal; |
|
257
|
|
|
} |
|
258
|
|
|
|
|
259
|
|
|
/** |
|
260
|
|
|
* @param float $orderTotal |
|
261
|
|
|
*/ |
|
262
|
|
|
public function setOrderTotal($orderTotal) |
|
263
|
|
|
{ |
|
264
|
|
|
$this->orderTotal = $orderTotal; |
|
265
|
|
|
} |
|
266
|
|
|
|
|
267
|
|
|
/** |
|
268
|
|
|
* @return float |
|
269
|
|
|
*/ |
|
270
|
|
|
public function getTaxTotal() |
|
271
|
|
|
{ |
|
272
|
|
|
return $this->taxTotal; |
|
273
|
|
|
} |
|
274
|
|
|
|
|
275
|
|
|
/** |
|
276
|
|
|
* @param float $taxTotal |
|
277
|
|
|
*/ |
|
278
|
|
|
public function setTaxTotal($taxTotal) |
|
279
|
|
|
{ |
|
280
|
|
|
$this->taxTotal = $taxTotal; |
|
281
|
|
|
} |
|
282
|
|
|
|
|
283
|
|
|
/** |
|
284
|
|
|
* @return float |
|
285
|
|
|
*/ |
|
286
|
|
|
public function getShippingTotal() |
|
287
|
|
|
{ |
|
288
|
|
|
return $this->shippingTotal; |
|
289
|
|
|
} |
|
290
|
|
|
|
|
291
|
|
|
/** |
|
292
|
|
|
* @param float $shippingTotal |
|
293
|
|
|
*/ |
|
294
|
|
|
public function setShippingTotal($shippingTotal) |
|
295
|
|
|
{ |
|
296
|
|
|
$this->shippingTotal = $shippingTotal; |
|
297
|
|
|
} |
|
298
|
|
|
|
|
299
|
|
|
/** |
|
300
|
|
|
* @return string |
|
301
|
|
|
*/ |
|
302
|
|
|
public function getTrackingCode() |
|
303
|
|
|
{ |
|
304
|
|
|
return $this->trackingCode; |
|
305
|
|
|
} |
|
306
|
|
|
|
|
307
|
|
|
/** |
|
308
|
|
|
* @param string $trackingCode |
|
309
|
|
|
*/ |
|
310
|
|
|
public function setTrackingCode($trackingCode) |
|
311
|
|
|
{ |
|
312
|
|
|
$this->trackingCode = $trackingCode; |
|
313
|
|
|
} |
|
314
|
|
|
|
|
315
|
|
|
/** |
|
316
|
|
|
* @return string |
|
317
|
|
|
*/ |
|
318
|
|
|
public function getProcessedAtForeign() |
|
319
|
|
|
{ |
|
320
|
|
|
return $this->processedAtForeign; |
|
321
|
|
|
} |
|
322
|
|
|
|
|
323
|
|
|
/** |
|
324
|
|
|
* @param string $processedAtForeign |
|
325
|
|
|
*/ |
|
326
|
|
|
public function setProcessedAtForeign($processedAtForeign) |
|
327
|
|
|
{ |
|
328
|
|
|
$this->processedAtForeign = $processedAtForeign; |
|
329
|
|
|
} |
|
330
|
|
|
|
|
331
|
|
|
/** |
|
332
|
|
|
* @return string |
|
333
|
|
|
*/ |
|
334
|
|
|
public function getCancelledAtForeign() |
|
335
|
|
|
{ |
|
336
|
|
|
return $this->cancelledAtForeign; |
|
337
|
|
|
} |
|
338
|
|
|
|
|
339
|
|
|
/** |
|
340
|
|
|
* @param string $cancelledAtForeign |
|
341
|
|
|
*/ |
|
342
|
|
|
public function setCancelledAtForeign($cancelledAtForeign) |
|
343
|
|
|
{ |
|
344
|
|
|
$this->cancelledAtForeign = $cancelledAtForeign; |
|
345
|
|
|
} |
|
346
|
|
|
|
|
347
|
|
|
/** |
|
348
|
|
|
* @return string |
|
349
|
|
|
*/ |
|
350
|
|
|
public function getUpdatedAtForeign() |
|
351
|
|
|
{ |
|
352
|
|
|
return $this->updatedAtForeign; |
|
353
|
|
|
} |
|
354
|
|
|
|
|
355
|
|
|
/** |
|
356
|
|
|
* @param string $updatedAtForeign |
|
357
|
|
|
*/ |
|
358
|
|
|
public function setUpdatedAtForeign($updatedAtForeign) |
|
359
|
|
|
{ |
|
360
|
|
|
$this->updatedAtForeign = $updatedAtForeign; |
|
361
|
|
|
} |
|
362
|
|
|
|
|
363
|
|
|
/** |
|
364
|
|
|
* @return Address |
|
365
|
|
|
*/ |
|
366
|
|
|
public function getShippingAddress() |
|
367
|
|
|
{ |
|
368
|
|
|
return $this->shippingAddress; |
|
369
|
|
|
} |
|
370
|
|
|
|
|
371
|
|
|
/** |
|
372
|
|
|
* @param Address $shippingAddress |
|
373
|
|
|
*/ |
|
374
|
|
|
public function setShippingAddress($shippingAddress) |
|
375
|
|
|
{ |
|
376
|
|
|
$this->shippingAddress = $shippingAddress; |
|
377
|
|
|
} |
|
378
|
|
|
|
|
379
|
|
|
/** |
|
380
|
|
|
* @return Address |
|
381
|
|
|
*/ |
|
382
|
|
|
public function getBillingAddress() |
|
383
|
|
|
{ |
|
384
|
|
|
return $this->billingAddress; |
|
385
|
|
|
} |
|
386
|
|
|
|
|
387
|
|
|
/** |
|
388
|
|
|
* @param Address $billingAddress |
|
389
|
|
|
*/ |
|
390
|
|
|
public function setBillingAddress($billingAddress) |
|
391
|
|
|
{ |
|
392
|
|
|
$this->billingAddress = $billingAddress; |
|
393
|
|
|
} |
|
394
|
|
|
|
|
395
|
|
|
/** |
|
396
|
|
|
* @return array |
|
397
|
|
|
*/ |
|
398
|
|
|
public function getOrderLines() |
|
399
|
|
|
{ |
|
400
|
|
|
return $this->orderLines; |
|
401
|
|
|
} |
|
402
|
|
|
|
|
403
|
|
|
/** |
|
404
|
|
|
* @param array $orderLines |
|
405
|
|
|
*/ |
|
406
|
|
|
public function setOrderLines($orderLines) |
|
407
|
|
|
{ |
|
408
|
|
|
$this->orderLines = $orderLines; |
|
409
|
|
|
} |
|
410
|
|
|
} |