1 <?php
2
3 /* --------------------------------------------------------------
4 OrderTotalRepositoryWriterInterface.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 OrderTotalRepositoryWriterInterface
15 *
16 * @category System
17 * @package Order
18 * @subpackage Interfaces
19 */
20 interface OrderTotalRepositoryWriterInterface
21 {
22 /**
23 * Inserts an order total item to an order by the given order ID.
24 *
25 * @param IdType $orderId ID of the order.
26 * @param OrderTotalInterface $orderTotal Order total item to insert.
27 *
28 * @return int ID of stored order total item.
29 */
30 public function insertIntoOrder(IdType $orderId, OrderTotalInterface $orderTotal);
31
32
33 /**
34 * Updates the passed order total item.
35 *
36 * @param StoredOrderTotalInterface $orderTotal Order total item to update.
37 *
38 * @return OrderTotalRepositoryWriterInterface Same instance for method chaining.
39 */
40 public function update(StoredOrderTotalInterface $orderTotal);
41 }