1 <?php
2
3 /* --------------------------------------------------------------
4 OrderReadServiceInterface.php 2015-12-15
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 OrderReadServiceInterface
15 *
16 * @category System
17 * @package Order
18 * @subpackage Interfaces
19 */
20 interface OrderReadServiceInterface
21 {
22 /**
23 * Returns an order, depending on the provided order ID.
24 *
25 * @param IdType $orderId Order ID.
26 *
27 * @return Order Found order.
28 */
29 public function getOrderById(IdType $orderId);
30
31
32 /**
33 * Returns a stored order item, depending on the provided order item ID.
34 *
35 * @param IdType $orderItemId Order item ID.
36 *
37 * @return StoredOrderItemInterface Found stored order item interface.
38 */
39 public function getOrderItemById(IdType $orderItemId);
40
41
42 /**
43 * Returns an OrderListItemCollection depending on the provided arguments.
44 *
45 * @param IntType $startIndex Start index of order list item collections which should be returned.
46 * @param IntType $maxCount Maximum amount of collections.
47 * @param StringType $orderBy Argument to specify the order.
48 *
49 * @return OrderListItemCollection Order list item collection.
50 */
51 public function getOrderList(IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null);
52
53
54 /**
55 * Returns an OrderListItemCollection depending on the provided customer ID.
56 *
57 * @param IdType $customerId Customer ID
58 * @param IntType $startIndex Start index of order list item collections which should be returned.
59 * @param IntType $maxCount Maximum amount of collections.
60 * @param StringType $orderBy Argument to specify the order.
61 *
62 * @return OrderListItemCollection Order list item collection.
63 */
64 public function getOrderListByCustomerId(IdType $customerId,
65 IntType $startIndex = null,
66 IntType $maxCount = null,
67 StringType $orderBy = null);
68
69
70 /**
71 * Returns an OrderListItemCollection depending on the provided order status ID.
72 *
73 * @param IdType $orderStatusId Order status ID
74 * @param IntType $startIndex Start index of order list item collections which should be returned.
75 * @param IntType $maxCount Maximum amount of collections.
76 * @param StringType $orderBy Argument to specify the order.
77 *
78 * @return OrderListItemCollection Order list item collection.
79 */
80 public function getOrderListByOrderStatusId(IdType $orderStatusId,
81 IntType $startIndex = null,
82 IntType $maxCount = null,
83 StringType $orderBy = null);
84
85
86 /**
87 * Filter the order list by a string keyword.
88 *
89 * @param StringType $keyword Keyword to be used for searching the order list items.
90 * @param IntType $startIndex Start index of order list item collections which should be returned.
91 * @param IntType $maxCount Maximum amount of collections.
92 * @param StringType $orderBy Argument to specify the order.
93 *
94 * @return OrderListItemCollection Order list item collection.
95 */
96 public function getOrderListByKeyword(StringType $keyword,
97 IntType $startIndex = null,
98 IntType $maxCount = null,
99 StringType $orderBy = null);
100 }