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