1 <?php
2
3 /* --------------------------------------------------------------
4 OrderItemInterface.inc.php 2015-12-23
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2015 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 /**
14 * Interface OrderItemInterface
15 *
16 * @category System
17 * @package Order
18 * @subpackage Interfaces
19 */
20 interface OrderItemInterface
21 {
22 /**
23 * Returns the product model of the order item.
24 *
25 * @return string Product model of the order item.
26 */
27 public function getProductModel();
28
29
30 /**
31 * Returns the name of the order item.
32 *
33 * @return string Name of the order item.
34 */
35 public function getName();
36
37
38 /**
39 * Returns the price of the order item.
40 *
41 * @return double Price of the order item.
42 */
43 public function getPrice();
44
45
46 /**
47 * Returns the quantity of the order item.
48 *
49 * @return double Quantity of the order item.
50 */
51 public function getQuantity();
52
53
54 /**
55 * Returns the final price of the order item.
56 *
57 * @return float Final price of the order item.
58 */
59 public function getFinalPrice();
60
61
62 /**
63 * Returns the tax of the order item.
64 *
65 * @return float Tax of the order item.
66 */
67 public function getTax();
68
69
70 /**
71 * Is tax of the order item allowed?
72 *
73 * @return bool Is tax of the order item allowed?
74 */
75 public function isTaxAllowed();
76
77
78 /**
79 * Returns the amount of discount of the order item.
80 *
81 * @return float Amount of discount of the order item.
82 */
83 public function getDiscountMade();
84
85
86 /**
87 * Returns the shipping time of the order item.
88 *
89 * @return string Shipping time of the order item.
90 */
91 public function getShippingTimeInfo();
92
93
94 /**
95 * Returns the attributes of the order item.
96 *
97 * @return OrderItemAttributeCollection Attributes of the order item.
98 */
99 public function getAttributes();
100
101
102 /**
103 * Returns the name of quantity unit of the order item.
104 *
105 * @return string Name of quantity unit of the order item.
106 */
107 public function getQuantityUnitName();
108
109
110 /**
111 * Returns the checkout information of the order item.
112 *
113 * @return string Checkout information of the order item.
114 */
115 public function getCheckoutInformation();
116
117
118 /**
119 * Returns the download information of the order item.
120 *
121 * @return OrderItemDownloadInformation Download information of the order item.
122 */
123 public function getDownloadInformation();
124
125
126 /**
127 * Sets the product model of the order item.
128 *
129 * @param StringType $model Model of the order item.
130 *
131 * @return OrderItemInterface Same instance for method chaining.
132 */
133 public function setProductModel(StringType $model);
134
135
136 /**
137 * Sets the name of the order item.
138 *
139 * @param StringType $name Name of the order item.
140 *
141 * @return OrderItemInterface Same instance for method chaining.
142 */
143 public function setName(StringType $name);
144
145
146 /**
147 * Sets the price of the order item.
148 *
149 * @param DecimalType $price Price of the order item.
150 *
151 * @return OrderItemInterface Same instance for method chaining.
152 */
153 public function setPrice(DecimalType $price);
154
155
156 /**
157 * Sets the quantity of the order item.
158 *
159 * @param DecimalType $quantity Quantity of the order item.
160 *
161 * @return OrderItemInterface Same instance for method chaining.
162 */
163 public function setQuantity(DecimalType $quantity);
164
165
166 /**
167 * Sets the tax of the order item.
168 *
169 * @param DecimalType $tax Tax of the order item.
170 *
171 * @return OrderItemInterface Same instance for method chaining.
172 */
173 public function setTax(DecimalType $tax);
174
175
176 /**
177 * Sets whether tax of the OrderItem is allowed or not.
178 *
179 * @param BoolType $allow Tax allowed or not?
180 *
181 * @return OrderItemInterface Same instance for method chaining.
182 */
183 public function setTaxAllowed(BoolType $allow);
184
185
186 /**
187 * Sets the discount of the order item.
188 *
189 * @param DecimalType $discount Discount of the order item.
190 *
191 * @return OrderItemInterface Same instance for method chaining.
192 */
193 public function setDiscountMade(DecimalType $discount);
194
195
196 /**
197 * Sets the shipping time of the order item.
198 *
199 * @param StringType $time Shipping time of the order item.
200 *
201 * @return OrderItemInterface Same instance for method chaining.
202 */
203 public function setShippingTimeInfo(StringType $time);
204
205
206 /**
207 * Sets the attributes of the order item.
208 *
209 * @param OrderItemAttributeCollection $attributeCollection Attributes of the order item.
210 *
211 * @return OrderItemInterface Same instance for method chaining.
212 */
213 public function setAttributes(OrderItemAttributeCollection $attributeCollection);
214
215
216 /**
217 * Sets the name of quantity unit of the order item.
218 *
219 * @param StringType $name Name of quantity unit of the order item.
220 *
221 * @return OrderItemInterface Same instance for method chaining.
222 */
223 public function setQuantityUnitName(StringType $name);
224
225
226 /**
227 * Sets the checkout information.
228 *
229 * @param StringType $checkoutInformation Contains the checkout info of the order item.
230 *
231 * @return OrderItemInterface Same instance for method chaining.
232 */
233 public function setCheckoutInformation(StringType $checkoutInformation);
234
235
236 /**
237 * Sets the download information of the order item.
238 *
239 * @param OrderItemDownloadInformation $download Download information of the order item.
240 *
241 * @return OrderItemInterface Same instance for method chaining.
242 */
243 public function setDownloadInformation(OrderItemDownloadInformation $download);
244
245
246 /**
247 * Returns the addon collection of the order item.
248 *
249 * @return EditableKeyValueCollection The addon collection of the order item.
250 */
251 public function getAddonValues();
252
253
254 /**
255 * Returns the order addon key value from collection.
256 *
257 * @param StringType $key Addon key.
258 *
259 * @throws InvalidArgumentException On invalid arguments.
260 * @return string Addon value.
261 */
262 public function getAddonValue(StringType $key);
263
264
265 /**
266 * Adds/updates a key value in the addon value collection.
267 *
268 * @param StringType $key Addon key.
269 * @param StringType $value Addon value.
270 *
271 * @return OrderItemInterface Same instance for method chaining.
272 */
273 public function setAddonValue(StringType $key, StringType $value);
274
275
276 /**
277 * Merges the existing addon values with new ones.
278 *
279 * @param KeyValueCollection $addonValues Contains the new addon values to be merged with the existing ones.
280 *
281 * @return OrderItemInterface Same instance for method chaining.
282 */
283 public function addAddonValues(KeyValueCollection $addonValues);
284
285
286 /**
287 * Deletes a specific addon value entry by key.
288 *
289 * @param StringType $key Addon key.
290 *
291 * @return OrderItemInterface Same instance for method chaining.
292 */
293 public function deleteAddonValue(StringType $key);
294 }