OrderInvoice::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 5
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 OrderInvoice
24
 *
25
 * @package Smalot\Magento\Order
26
 */
27
class OrderInvoice extends MagentoModuleAbstract
28
{
29
    /**
30
     * Allows you to add a new comment to the order invoice.
31
     *
32
     * @param string $invoiceIncrementId
33
     * @param string $comment
34
     * @param int    $email
35
     * @param int    $includeComment
36
     *
37
     * @return ActionInterface
38
     */
39
    public function addComment($invoiceIncrementId, $comment = null, $email = null, $includeComment = null)
0 ignored issues
show
Unused Code introduced by
The parameter $invoiceIncrementId is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $comment is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $email is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $includeComment is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
40
    {
41
        return $this->__createAction('order_invoice.addComment', func_get_args());
42
    }
43
44
    /**
45
     * Allows you to cancel the required invoice.
46
     * Note that not all order invoices can be canceled.
47
     * Only some payment methods support canceling the order invoice
48
     * (e.g., Google Checkout, PayPal Pro, PayPal Express Checkout).
49
     *
50
     * @param string $invoiceIncrementId
51
     *
52
     * @return ActionInterface
53
     */
54
    public function cancel($invoiceIncrementId)
0 ignored issues
show
Unused Code introduced by
The parameter $invoiceIncrementId is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
55
    {
56
        return $this->__createAction('order_invoice.cancel', func_get_args());
57
    }
58
59
    /**
60
     * Allows you to capture the required invoice.
61
     * Note that not all order invoices can be captured.
62
     * Only some payment methods support capturing the order invoice (e.g., PayPal Pro).
63
     *
64
     * @param string $invoiceIncrementId
65
     *
66
     * @return ActionInterface
67
     */
68
    public function capture($invoiceIncrementId)
0 ignored issues
show
Unused Code introduced by
The parameter $invoiceIncrementId is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
69
    {
70
        return $this->__createAction('order_invoice.capture', func_get_args());
71
    }
72
73
    /**
74
     * Allows you to create a new invoice for an order.
75
     *
76
     * @param string $orderIncrementId
77
     * @param array  $itemsQty
78
     * @param string $comment
79
     * @param string $email
80
     * @param string $includeComment
81
     *
82
     * @return ActionInterface
83
     */
84
    public function create($orderIncrementId, $itemsQty, $comment, $email, $includeComment)
0 ignored issues
show
Unused Code introduced by
The parameter $orderIncrementId is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $itemsQty is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $comment is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $email is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $includeComment is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
85
    {
86
        return $this->__createAction('order_invoice.create', func_get_args());
87
    }
88
89
    /**
90
     * @param string $invoiceIncrementId
91
     *
92
     * @return ActionInterface
93
     */
94
    public function getInfo($invoiceIncrementId)
0 ignored issues
show
Unused Code introduced by
The parameter $invoiceIncrementId is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
95
    {
96
        return $this->__createAction('order_invoice.info', func_get_args());
97
    }
98
99
    /**
100
     * @param array $filters
101
     *
102
     * @return ActionInterface
103
     */
104
    public function getList($filters = null)
0 ignored issues
show
Unused Code introduced by
The parameter $filters is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
105
    {
106
        return $this->__createAction('order_invoice.list', func_get_args());
107
    }
108
}
109