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 OrderCreditMemo |
24
|
|
|
* |
25
|
|
|
* @package Smalot\Magento\Order |
26
|
|
|
*/ |
27
|
|
|
class OrderCreditMemo extends MagentoModuleAbstract |
28
|
|
|
{ |
29
|
|
|
/** |
30
|
|
|
* Allows you to add a new comment to an existing credit memo. |
31
|
|
|
* Email notification can be sent to the user email. |
32
|
|
|
* |
33
|
|
|
* @param string $creditmemoIncrementId |
34
|
|
|
* @param string $comment |
35
|
|
|
* @param string $notifyCustomer |
36
|
|
|
* @param string $includeComment |
37
|
|
|
* |
38
|
|
|
* @return ActionInterface |
39
|
|
|
*/ |
40
|
|
|
public function addComment($creditmemoIncrementId, $comment = null, $notifyCustomer = null, $includeComment = null) |
|
|
|
|
41
|
|
|
{ |
42
|
|
|
return $this->__createAction('order_creditmemo.addComment', func_get_args()); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* Allows you to cancel an existing credit memo. |
47
|
|
|
* |
48
|
|
|
* @param string $creditmemoIncrementId |
49
|
|
|
* |
50
|
|
|
* @return ActionInterface |
51
|
|
|
*/ |
52
|
|
|
public function cancel($creditmemoIncrementId) |
|
|
|
|
53
|
|
|
{ |
54
|
|
|
return $this->__createAction('order_creditmemo.cancel', func_get_args()); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Allows you to create a new credit memo for the invoiced order. |
59
|
|
|
* Comments can be added and an email notification can be sent to the user email. |
60
|
|
|
* |
61
|
|
|
* @param string $orderIncrementId |
62
|
|
|
* @param array $creditmemoData |
63
|
|
|
* @param string $comment |
64
|
|
|
* @param int $notifyCustomer |
65
|
|
|
* @param int $includeComment |
66
|
|
|
* @param string $refundToStoreCreditAmount |
67
|
|
|
* |
68
|
|
|
* @return ActionInterface |
69
|
|
|
*/ |
70
|
|
|
public function create( |
71
|
|
|
$orderIncrementId, |
|
|
|
|
72
|
|
|
$creditmemoData = null, |
|
|
|
|
73
|
|
|
$comment = null, |
|
|
|
|
74
|
|
|
$notifyCustomer = null, |
|
|
|
|
75
|
|
|
$includeComment = null, |
|
|
|
|
76
|
|
|
$refundToStoreCreditAmount = null |
|
|
|
|
77
|
|
|
) { |
78
|
|
|
return $this->__createAction('order_creditmemo.create', func_get_args()); |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* Allows you to retrieve full information about the specified credit memo. |
83
|
|
|
* |
84
|
|
|
* @param string $creditmemoIncrementId |
85
|
|
|
* |
86
|
|
|
* @return ActionInterface |
87
|
|
|
*/ |
88
|
|
|
public function getInfo($creditmemoIncrementId) |
|
|
|
|
89
|
|
|
{ |
90
|
|
|
return $this->__createAction('order_creditmemo.info', func_get_args()); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
/** |
94
|
|
|
* Allows you to retrieve the list of credit memos by filters. |
95
|
|
|
* |
96
|
|
|
* @param array $filters |
97
|
|
|
* |
98
|
|
|
* @return ActionInterface |
99
|
|
|
*/ |
100
|
|
|
public function getList($filters) |
|
|
|
|
101
|
|
|
{ |
102
|
|
|
return $this->__createAction('order_creditmemo.list', func_get_args()); |
103
|
|
|
} |
104
|
|
|
} |
105
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.