1 | <?php |
||
12 | class OrderLineItem { |
||
13 | /** |
||
14 | * @ODM\Int |
||
15 | * @JMS\Type("integer") |
||
16 | */ |
||
17 | protected $productId; |
||
18 | |||
19 | /** |
||
20 | * @ODM\Int |
||
21 | * @JMS\Type("integer") |
||
22 | */ |
||
23 | protected $quantity; |
||
24 | |||
25 | /** |
||
26 | * @ODM\Float |
||
27 | * @JMS\Type("double") |
||
28 | */ |
||
29 | protected $price; |
||
30 | |||
31 | /** |
||
32 | * @ODM\Float |
||
33 | * @JMS\Type("double") |
||
34 | */ |
||
35 | protected $total; |
||
36 | |||
37 | /** |
||
38 | * Set productId |
||
39 | * |
||
40 | * @param int $productId |
||
41 | * @return self |
||
42 | */ |
||
43 | 25 | public function setProductId($productId) |
|
48 | |||
49 | /** |
||
50 | * Get productId |
||
51 | * |
||
52 | * @return int $productId |
||
53 | */ |
||
54 | 2 | public function getProductId() |
|
58 | |||
59 | /** |
||
60 | * Set quantity |
||
61 | * |
||
62 | * @param int $quantity |
||
63 | * @return self |
||
64 | */ |
||
65 | 25 | public function setQuantity($quantity) |
|
70 | |||
71 | /** |
||
72 | * Get quantity |
||
73 | * |
||
74 | * @return int $quantity |
||
75 | */ |
||
76 | public function getQuantity() |
||
80 | |||
81 | /** |
||
82 | * Set price |
||
83 | * |
||
84 | * @param float $price |
||
85 | * @return self |
||
86 | */ |
||
87 | 25 | public function setPrice($price) |
|
92 | |||
93 | /** |
||
94 | * Get price |
||
95 | * |
||
96 | * @return float $price |
||
97 | */ |
||
98 | public function getPrice() |
||
102 | |||
103 | /** |
||
104 | * Set total |
||
105 | * |
||
106 | * @param float $total |
||
107 | * @return self |
||
108 | */ |
||
109 | 25 | public function setTotal($total) |
|
114 | |||
115 | /** |
||
116 | * Get total |
||
117 | * |
||
118 | * @return float $total |
||
119 | */ |
||
120 | public function getTotal() |
||
124 | |||
125 | /** |
||
126 | * Static class to create a new instance of OrderLineItem |
||
127 | * @return OrderLineItem |
||
128 | */ |
||
129 | 25 | public static function newInstance() { |
|
132 | } |
||
133 |