1 <?php
2 /* --------------------------------------------------------------
3 CustomerAddressRepositoryInterface.inc.php 2015-02-18 gm
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2015 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12 /**
13 * Interface CustomerAddressRepositoryInterface
14 *
15 * @category System
16 * @package Customer
17 * @subpackage Interfaces
18 */
19 interface CustomerAddressRepositoryInterface
20 {
21 /**
22 * Method to delete all customers addresses with a given customer
23 *
24 * @param \CustomerInterface $customer
25 */
26 public function deleteCustomerAddressesByCustomer(CustomerInterface $customer);
27
28
29 /**
30 * Method to get all customers addresses
31 *
32 * @param \CustomerInterface $customer
33 *
34 * @return array of CustomerAddress objects
35 */
36 public function getCustomerAddresses(CustomerInterface $customer);
37
38
39 /**
40 * Method to store the customer address
41 *
42 * @param \CustomerAddressInterface $address
43 *
44 * @return CustomerAddressInterface
45 */
46 public function store(CustomerAddressInterface $address);
47
48
49 /**
50 * Method to delete a customer address
51 *
52 * @param \CustomerAddressInterface $address
53 */
54 public function deleteCustomerAddress(CustomerAddressInterface $address);
55
56
57 /**
58 * Method to get a customer address with a given ID
59 *
60 * @param IdType $addressBookId
61 *
62 * @return CustomerAddress
63 */
64 public function getById(IdType $addressBookId);
65
66
67 /**
68 * Method to find a customer address with a given ID it it exists else it will return null
69 *
70 * @param IdType $addressBookId
71 *
72 * @return CustomerAddress|null
73 */
74 public function findById(IdType $addressBookId);
75 }