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 OrderLine |
18
|
|
|
{ |
19
|
|
|
/** |
20
|
|
|
* A unique identifier for the order line item. |
21
|
|
|
* |
22
|
|
|
* @var string |
23
|
|
|
*/ |
24
|
|
|
private $id; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* A unique identifier for the product associated with the order line item. |
28
|
|
|
* |
29
|
|
|
* @var Product |
30
|
|
|
*/ |
31
|
|
|
private $product; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* A unique identifier for the product variant associated with the order line item. |
35
|
|
|
* |
36
|
|
|
* @var ProductVariant |
37
|
|
|
*/ |
38
|
|
|
private $productVariant; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* The quantity of an order line item. |
42
|
|
|
* |
43
|
|
|
* @var integer |
44
|
|
|
*/ |
45
|
|
|
private $quantity; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* The price of an order line item. |
49
|
|
|
* |
50
|
|
|
* @var float |
51
|
|
|
*/ |
52
|
|
|
private $price; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @return string |
56
|
|
|
*/ |
57
|
|
|
public function getId() |
58
|
|
|
{ |
59
|
|
|
return $this->id; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @param string $id |
64
|
|
|
*/ |
65
|
|
|
public function setId($id) |
66
|
|
|
{ |
67
|
|
|
$this->id = $id; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return Product |
72
|
|
|
*/ |
73
|
|
|
public function getProduct() |
74
|
|
|
{ |
75
|
|
|
return $this->product; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @param Product $product |
80
|
|
|
*/ |
81
|
|
|
public function setProduct($product) |
82
|
|
|
{ |
83
|
|
|
$this->product = $product; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return ProductVariant |
88
|
|
|
*/ |
89
|
|
|
public function getProductVariant() |
90
|
|
|
{ |
91
|
|
|
return $this->productVariant; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @param ProductVariant $productVariant |
96
|
|
|
*/ |
97
|
|
|
public function setProductVariant($productVariant) |
98
|
|
|
{ |
99
|
|
|
$this->productVariant = $productVariant; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return int |
104
|
|
|
*/ |
105
|
|
|
public function getQuantity() |
106
|
|
|
{ |
107
|
|
|
return $this->quantity; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param int $quantity |
112
|
|
|
*/ |
113
|
|
|
public function setQuantity($quantity) |
114
|
|
|
{ |
115
|
|
|
$this->quantity = $quantity; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @return float |
120
|
|
|
*/ |
121
|
|
|
public function getPrice() |
122
|
|
|
{ |
123
|
|
|
return $this->price; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @param float $price |
128
|
|
|
*/ |
129
|
|
|
public function setPrice($price) |
130
|
|
|
{ |
131
|
|
|
$this->price = $price; |
132
|
|
|
} |
133
|
|
|
} |