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\Customer; |
18
|
|
|
|
19
|
|
|
use Smalot\Magento\ActionInterface; |
20
|
|
|
use Smalot\Magento\MagentoModuleAbstract; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Class Customer |
24
|
|
|
* |
25
|
|
|
* @package Smalot\Magento\Customer |
26
|
|
|
*/ |
27
|
|
|
class Customer extends MagentoModuleAbstract |
28
|
|
|
{ |
29
|
|
|
/** |
30
|
|
|
* Create a new customer. |
31
|
|
|
* |
32
|
|
|
* @param array $customerData |
33
|
|
|
* |
34
|
|
|
* @return ActionInterface |
35
|
|
|
*/ |
36
|
|
|
public function create($customerData) |
|
|
|
|
37
|
|
|
{ |
38
|
|
|
return $this->__createAction('customer.create', func_get_args()); |
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* Delete the required customer. |
43
|
|
|
* |
44
|
|
|
* @param int $customerId |
45
|
|
|
* |
46
|
|
|
* @return ActionInterface |
47
|
|
|
*/ |
48
|
|
|
public function delete($customerId) |
|
|
|
|
49
|
|
|
{ |
50
|
|
|
return $this->__createAction('customer.delete', func_get_args()); |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* Retrieve information about the specified customer. |
55
|
|
|
* |
56
|
|
|
* @param int $customerId |
57
|
|
|
* @param array $attributes |
58
|
|
|
* |
59
|
|
|
* @return ActionInterface |
60
|
|
|
*/ |
61
|
|
|
public function getInfo($customerId, $attributes) |
|
|
|
|
62
|
|
|
{ |
63
|
|
|
return $this->__createAction('customer.info', func_get_args()); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Allows you to retrieve the list of customers. |
68
|
|
|
* |
69
|
|
|
* @param array $filters |
70
|
|
|
* |
71
|
|
|
* @return ActionInterface |
72
|
|
|
*/ |
73
|
|
|
public function getList($filters) |
|
|
|
|
74
|
|
|
{ |
75
|
|
|
return $this->__createAction('customer.list', func_get_args()); |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Update information about the required customer. |
80
|
|
|
* Note that you need to pass only those arguments which you want to be updated. |
81
|
|
|
* |
82
|
|
|
* @param int $customerId |
83
|
|
|
* @param array $customerData |
84
|
|
|
* |
85
|
|
|
* @return ActionInterface |
86
|
|
|
*/ |
87
|
|
|
public function update($customerId, $customerData) |
|
|
|
|
88
|
|
|
{ |
89
|
|
|
return $this->__createAction('customer.update', func_get_args()); |
90
|
|
|
} |
91
|
|
|
} |
92
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.