1 <?php
2 /* --------------------------------------------------------------
3 OrderInterface.inc.php 2016-01-18
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2016 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12 /**
13 * Interface OrderInterface
14 *
15 * @category System
16 * @package Order
17 * @subpackage Interfaces
18 */
19 interface OrderInterface
20 {
21 /**
22 * Returns the order ID.
23 *
24 * @return int Order ID.
25 */
26 public function getOrderId();
27
28
29 /**
30 * Returns the unique order hash.
31 *
32 * @return string Unique order hash.
33 */
34 public function getOrderHash();
35
36
37 /**
38 * Returns the associated customer ID.
39 *
40 * @return int Associated customer ID.
41 */
42 public function getCustomerId();
43
44
45 /**
46 * Returns the associated customer email address.
47 *
48 * @return string Associated customer email address.
49 */
50 public function getCustomerEmail();
51
52
53 /**
54 * Returns the associated customer telephone number.
55 *
56 * @return string Associated customer telephone number.
57 */
58 public function getCustomerTelephone();
59
60
61 /**
62 * Returns the order status ID.
63 *
64 * @return int Order status ID.
65 */
66 public function getStatusId();
67
68
69 /**
70 * Sets customer number of Order
71 *
72 * @param StringType $customerNumber Customer number.
73 *
74 * @return OrderInterface Same instance for method chaining.
75 */
76 public function setCustomerNumber(StringType $customerNumber);
77
78
79 /**
80 * Returns the customer number.
81 *
82 * @return string Customer number.
83 */
84 public function getCustomerNumber();
85
86
87 /**
88 * Sets the VAT ID Number.
89 *
90 * @param StringType $vatIdNumber VAT ID number.
91 *
92 * @return OrderInterface Same instance for method chaining.
93 */
94 public function setVatIdNumber(StringType $vatIdNumber);
95
96
97 /**
98 * Returns the VAT ID number.
99 *
100 * @return string VAT ID number.
101 */
102 public function getVatIdNumber();
103
104
105 /**
106 * Sets the customer status information.
107 *
108 * @param CustomerStatusInformation $customerStatusInformation Customer status information.
109 */
110 public function setCustomerStatusInformation(CustomerStatusInformation $customerStatusInformation);
111
112
113 /**
114 * Returns the Customer status information.
115 *
116 * @return CustomerStatusInformation Customer status information.
117 */
118 public function getCustomerStatusInformation();
119
120
121 /**
122 * Returns the customer address.
123 *
124 * @return AddressBlockInterface Customer address.
125 */
126 public function getCustomerAddress();
127
128
129 /**
130 * Returns the billing address.
131 *
132 * @return AddressBlockInterface Billing address.
133 */
134 public function getBillingAddress();
135
136
137 /**
138 * Returns the delivery address.
139 *
140 * @return AddressBlockInterface Delivery address.
141 */
142 public function getDeliveryAddress();
143
144
145 /**
146 * Returns the order items collection.
147 *
148 * @return OrderItemCollection Order items collection.
149 */
150 public function getOrderItems();
151
152
153 /**
154 * Returns the order totals collection.
155 *
156 * @return OrderTotalCollection Order totals collection.
157 */
158 public function getOrderTotals();
159
160
161 /**
162 * Returns the order shipping type.
163 *
164 * @return OrderShippingType Order shipping type.
165 */
166 public function getShippingType();
167
168
169 /**
170 * Returns the order payment type.
171 *
172 * @return OrderPaymentType Order payment type.
173 */
174 public function getPaymentType();
175
176
177 /**
178 * Returns the order currency code.
179 *
180 * @return CurrencyCode Order currency code.
181 */
182 public function getCurrencyCode();
183
184
185 /**
186 * Returns the order language code.
187 *
188 * @return LanguageCode Order language code.
189 */
190 public function getLanguageCode();
191
192
193 /**
194 * Returns the order purchase datetime.
195 *
196 * @return DateTime Order purchase datetime.
197 */
198 public function getPurchaseDateTime();
199
200
201 /**
202 * Returns the datetime of last modification.
203 *
204 * @return DateTime Datetime of last modification.
205 */
206 public function getLastModifiedDateTime();
207
208
209 /**
210 * Returns the order status history.
211 *
212 * @return OrderStatusHistoryListItemCollection Order status history.
213 */
214 public function getStatusHistory();
215
216
217 /**
218 * Returns the order comment.
219 *
220 * @return string Order comment.
221 */
222 public function getComment();
223
224
225 /**
226 * Returns the order addon key value from collection.
227 *
228 * @param StringType $key Addon key.
229 *
230 * @return string Addon value.
231 */
232 public function getAddonValue(StringType $key);
233
234
235 /**
236 * Returns the order addon value collection.
237 *
238 * @return EditableKeyValueCollection Order addon value collection.
239 */
240 public function getAddonValues();
241
242
243 /**
244 * Sets the order ID.
245 *
246 * @param IdType $id Order ID.
247 *
248 * @return OrderInterface Same instance for method chaining.
249 */
250 public function setOrderId(IdType $id);
251
252
253 /**
254 * Sets the associated customer ID.
255 *
256 * @param IdType $id Customer ID.
257 *
258 * @return OrderInterface Same instance for method chaining.
259 */
260 public function setCustomerId(IdType $id);
261
262
263 /**
264 * Sets the customer email address.
265 *
266 * @param EmailStringType $email Customer email address.
267 *
268 * @return OrderInterface Same instance for method chaining.
269 */
270 public function setCustomerEmail(EmailStringType $email);
271
272
273 /**
274 * Sets the customer telephone number.
275 *
276 * @param StringType $telephone Customer telephone number.
277 *
278 * @return OrderInterface Same instance for method chaining.
279 */
280 public function setCustomerTelephone(StringType $telephone);
281
282
283 /**
284 * Sets the order status ID.
285 *
286 * @param IdType $id Status ID.
287 *
288 * @return OrderInterface Same instance for method chaining.
289 */
290 public function setStatusId(IdType $id);
291
292
293 /**
294 * Sets the customer address.
295 *
296 * @param AddressBlockInterface $address Customer address.
297 *
298 * @return OrderInterface Same instance for method chaining.
299 */
300 public function setCustomerAddress(AddressBlockInterface $address);
301
302
303 /**
304 * Sets the billing address.
305 *
306 * @param AddressBlockInterface $address Billing address.
307 *
308 * @return OrderInterface Same instance for method chaining.
309 */
310 public function setBillingAddress(AddressBlockInterface $address);
311
312
313 /**
314 * Sets the delivery address.
315 *
316 * @param AddressBlockInterface $address Delivery address.
317 *
318 * @return OrderInterface Same instance for method chaining.
319 */
320 public function setDeliveryAddress(AddressBlockInterface $address);
321
322
323 /**
324 * Sets the order items collection.
325 *
326 * @param OrderItemCollection $collection Items collection.
327 *
328 * @return OrderInterface Same instance for method chaining.
329 */
330 public function setOrderItems(OrderItemCollection $collection);
331
332
333 /**
334 * Sets the order total collection.
335 *
336 * @param OrderTotalCollection $collection Total collection.
337 *
338 * @return OrderInterface Same instance for method chaining.
339 */
340 public function setOrderTotals(OrderTotalCollection $collection);
341
342
343 /**
344 * Sets the order shipping type.
345 *
346 * @param OrderShippingType $shippingType Shipping type.
347 *
348 * @return OrderInterface Same instance for method chaining.
349 */
350 public function setShippingType(OrderShippingType $shippingType);
351
352
353 /**
354 * Sets the order payment type.
355 *
356 * @param OrderPaymentType $paymentType Payment type.
357 *
358 * @return OrderInterface Same instance for method chaining.
359 */
360 public function setPaymentType(OrderPaymentType $paymentType);
361
362
363 /**
364 * Sets the order currency code.
365 *
366 * @param CurrencyCode $currencyCode Currency code.
367 *
368 * @return OrderInterface Same instance for method chaining.
369 */
370 public function setCurrencyCode(CurrencyCode $currencyCode);
371
372
373 /**
374 * Sets the order language code.
375 *
376 * @param LanguageCode $languageCode Language code.
377 *
378 * @return OrderInterface Same instance for method chaining.
379 */
380 public function setLanguageCode(LanguageCode $languageCode);
381
382
383 /**
384 * Sets the order purchase date time.
385 *
386 * @param DateTime $dateTime Purchase date time.
387 *
388 * @return OrderInterface Same instance for method chaining.
389 */
390 public function setPurchaseDateTime(DateTime $dateTime);
391
392
393 /**
394 * Sets the date time of last modification.
395 *
396 * @param DateTime $lastModifiedDateTime Last modification date time
397 *
398 * @return OrderInterface Same instance for method chaining.
399 */
400 public function setLastModifiedDateTime(DateTime $lastModifiedDateTime);
401
402
403 /**
404 * Sets the order comment.
405 *
406 * @param StringType $comment Comment.
407 *
408 * @return OrderInterface Same instance for method chaining.
409 */
410 public function setComment(StringType $comment);
411
412
413 /**
414 * Adds/updates a key value in the addon value collection.
415 *
416 * @param StringType $key Addon key.
417 * @param StringType $value Addon value.
418 *
419 * @return OrderInterface Same instance for method chaining.
420 */
421 public function setAddonValue(StringType $key, StringType $value);
422
423
424 /**
425 * Adds an addon collection to the existing one.
426 *
427 * @param KeyValueCollection $addonCollection Addon collection.
428 *
429 * @return OrderInterface Same instance for method chaining.
430 */
431 public function addAddonValues(KeyValueCollection $addonCollection);
432 }