1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @file |
5
|
|
|
* Magento API Client (SOAP v1). |
6
|
|
|
* Allows wrappers for each call, dependencies injections |
7
|
|
|
* and code completion. |
8
|
|
|
* |
9
|
|
|
* @author Sébastien MALOT <[email protected]> |
10
|
|
|
* @license MIT |
11
|
|
|
* @url <https://github.com/smalot/magento-client> |
12
|
|
|
* |
13
|
|
|
* For the full copyright and license information, please view the LICENSE |
14
|
|
|
* file that was distributed with this source code. |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
namespace Smalot\Magento\Order; |
18
|
|
|
|
19
|
|
|
use Smalot\Magento\ActionInterface; |
20
|
|
|
use Smalot\Magento\MagentoModuleAbstract; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Class Order |
24
|
|
|
* |
25
|
|
|
* @package Smalot\Magento\Order |
26
|
|
|
*/ |
27
|
|
|
class Order extends MagentoModuleAbstract |
28
|
|
|
{ |
29
|
|
|
/** |
30
|
|
|
* Allows you to add a new comment to the order. |
31
|
|
|
* |
32
|
|
|
* @param string $orderIncrementId |
33
|
|
|
* @param string $status |
34
|
|
|
* @param string $comment |
35
|
|
|
* @param string $notify |
36
|
|
|
* |
37
|
|
|
* @return ActionInterface |
38
|
|
|
*/ |
39
|
|
|
public function addComment($orderIncrementId, $status, $comment = null, $notify = null) |
|
|
|
|
40
|
|
|
{ |
41
|
|
|
return $this->__createAction('order.addComment', func_get_args()); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Allows you to cancel the required order. |
46
|
|
|
* |
47
|
|
|
* @param string $orderIncrementId |
48
|
|
|
* |
49
|
|
|
* @return ActionInterface |
50
|
|
|
*/ |
51
|
|
|
public function cancel($orderIncrementId) |
|
|
|
|
52
|
|
|
{ |
53
|
|
|
return $this->__createAction('order.cancel', func_get_args()); |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* Allows you to place the required order on hold. |
58
|
|
|
* |
59
|
|
|
* @param string $orderIncrementId |
60
|
|
|
* |
61
|
|
|
* @return ActionInterface |
62
|
|
|
*/ |
63
|
|
|
public function hold($orderIncrementId) |
|
|
|
|
64
|
|
|
{ |
65
|
|
|
return $this->__createAction('order.hold', func_get_args()); |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* Allows you to retrieve the required order information. |
70
|
|
|
* |
71
|
|
|
* @param string $orderIncrementId |
72
|
|
|
* |
73
|
|
|
* @return ActionInterface |
74
|
|
|
*/ |
75
|
|
|
public function getInfo($orderIncrementId) |
|
|
|
|
76
|
|
|
{ |
77
|
|
|
return $this->__createAction('order.info', func_get_args()); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* Allows you to retrieve the list of orders. Additional filters can be applied. |
82
|
|
|
* |
83
|
|
|
* @param array $filters |
84
|
|
|
* |
85
|
|
|
* @return ActionInterface |
86
|
|
|
*/ |
87
|
|
|
public function getList($filters) |
|
|
|
|
88
|
|
|
{ |
89
|
|
|
return $this->__createAction('order.list', func_get_args()); |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* Allows you to unhold the required order. |
94
|
|
|
* |
95
|
|
|
* @param string $orderIncrementId |
96
|
|
|
* |
97
|
|
|
* @return ActionInterface |
98
|
|
|
*/ |
99
|
|
|
public function unhold($orderIncrementId) |
|
|
|
|
100
|
|
|
{ |
101
|
|
|
return $this->__createAction('order.unhold', func_get_args()); |
102
|
|
|
} |
103
|
|
|
} |
104
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.