1 <?php
2
3 /* --------------------------------------------------------------
4 OrderTotalRepositoryInterface.inc.php 2015-11-03 gm
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 OrderTotalRepositoryInterface
15 *
16 * @category System
17 * @package Order
18 * @subpackage Interfaces
19 */
20 interface OrderTotalRepositoryInterface
21 {
22 /**
23 * Adds an order total object to the order.
24 *
25 * @param IdType $orderId ID of order.
26 * @param OrderTotalInterface $orderTotal Order total object.
27 *
28 * @return int ID of stored order total.
29 */
30 public function addToOrder(IdType $orderId, OrderTotalInterface $orderTotal);
31
32
33 /**
34 * Updates a stored order total object.
35 *
36 * @param StoredOrderTotalInterface $orderTotal Order total.
37 *
38 * @return OrderTotalRepositoryInterface Same instance for method chaining.
39 */
40 public function store(StoredOrderTotalInterface $orderTotal);
41
42
43 /**
44 * Returns an order total object by the given ID.
45 *
46 * @param IdType $orderTotalId ID of order total in database table.
47 *
48 * @return StoredOrderTotalInterface Fetched order total.
49 */
50 public function getTotalById(IdType $orderTotalId);
51
52
53 /**
54 * Returns an collection of order total objects by the given order ID.
55 *
56 * @param IdType $orderId ID of the order in the database table.
57 *
58 * @return StoredOrderTotalCollection Fetched order total collection.
59 */
60 public function getTotalsByOrderId(IdType $orderId);
61
62
63 /**
64 * Removes an order total by the given order total ID.
65 *
66 * @param IdType $orderTotalId ID of order total in the database table.
67 *
68 * @return OrderTotalRepositoryInterface Same instance for method chaining.
69 */
70 public function deleteTotalById(IdType $orderTotalId);
71
72
73 /**
74 * Removes multiple order totals by the given order ID.
75 *
76 * @param IdType $orderId Order ID.
77 *
78 * @return OrderTotalRepositoryInterface Same instance for method chaining.
79 */
80 public function deleteTotalsByOrderId(IdType $orderId);
81 }