/
OrderManagementInterface.php
83 lines (73 loc) · 2.09 KB
/
OrderManagementInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
namespace Magento\Sales\Api;
/**
* Order management interface.
*
* An order is a document that a web store issues to a customer. Magento generates a sales order that lists the product
* items, billing and shipping addresses, and shipping and payment methods. A corresponding external document, known as
* a purchase order, is emailed to the customer.
* @api
*/
interface OrderManagementInterface
{
/**
* Cancels a specified order.
*
* @param int $id The order ID.
* @return bool
*/
public function cancel($id);
/**
* Lists comments for a specified order.
*
* @param int $id The order ID.
* @return \Magento\Sales\Api\Data\OrderStatusHistorySearchResultInterface Order status history search results interface.
*/
public function getCommentsList($id);
/**
* Adds a comment to a specified order.
*
* @param int $id The order ID.
* @param \Magento\Sales\Api\Data\OrderStatusHistoryInterface $statusHistory Status history comment.
* @return bool
*/
public function addComment($id, \Magento\Sales\Api\Data\OrderStatusHistoryInterface $statusHistory);
/**
* Emails a user a specified order.
*
* @param int $id The order ID.
* @return bool
*/
public function notify($id);
/**
* Gets the status for a specified order.
*
* @param int $id The order ID.
* @return string Order status.
*/
public function getStatus($id);
/**
* Holds a specified order.
*
* @param int $id The order ID.
* @return bool
*/
public function hold($id);
/**
* Releases a specified order from hold status.
*
* @param int $id The order ID.
* @return bool
*/
public function unHold($id);
/**
* @param \Magento\Sales\Api\Data\OrderInterface $order
* @return \Magento\Sales\Api\Data\OrderInterface
*/
public function place(\Magento\Sales\Api\Data\OrderInterface $order);
}