1 <?php
2 /* --------------------------------------------------------------
3 CustomerWriteServiceInterface.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 CustomerWriteServiceInterface
14 *
15 * @category System
16 * @package Customer
17 * @subpackage Interfaces
18 */
19 interface CustomerWriteServiceInterface
20 {
21 /**
22 * Creates a new customer with the given parameters.
23 *
24 * @param CustomerEmailInterface $email Customer's E-Mail address.
25 * @param CustomerPasswordInterface $password Customer's password.
26 * @param DateTime $dateOfBirth Customer's date of birth.
27 * @param CustomerVatNumberInterface $vatNumber Customer's VAT number.
28 * @param CustomerCallNumberInterface $telephoneNumber Customer's telephone number.
29 * @param CustomerCallNumberInterface $faxNumber Customer's fax number.
30 * @param AddressBlockInterface $addressBlock Customer's address.
31 *
32 * @return Customer Created customer.
33 * @throws UnexpectedValueException On invalid arguments.
34 */
35 public function createNewRegistree(CustomerEmailInterface $email,
36 CustomerPasswordInterface $password,
37 DateTime $dateOfBirth,
38 CustomerVatNumberInterface $vatNumber,
39 CustomerCallNumberInterface $telephoneNumber,
40 CustomerCallNumberInterface $faxNumber,
41 AddressBlockInterface $addressBlock);
42
43
44 /**
45 * Creates a new guest account with the given parameters.
46 *
47 * @param CustomerEmailInterface $email Customer's E-Mail address.
48 * @param DateTime $dateOfBirth Customer's date of birth.
49 * @param CustomerVatNumberInterface $vatNumber Customer's VAT number.
50 * @param CustomerCallNumberInterface $telephoneNumber Customer's telephone number.
51 * @param CustomerCallNumberInterface $faxNumber Customer's fax number.
52 * @param AddressBlockInterface $addressBlock Customer's address.
53 *
54 * @return Customer Created guest customer.
55 * @throws UnexpectedValueException On invalid arguments.
56 */
57 public function createNewGuest(CustomerEmailInterface $email,
58 DateTime $dateOfBirth,
59 CustomerVatNumberInterface $vatNumber,
60 CustomerCallNumberInterface $telephoneNumber,
61 CustomerCallNumberInterface $faxNumber,
62 AddressBlockInterface $addressBlock);
63
64
65 /**
66 * Updates customer data.
67 *
68 * @param CustomerInterface $customer Customer.
69 *
70 * @return CustomerInterface Updated customer.
71 */
72 public function updateCustomer(CustomerInterface $customer);
73
74
75 /**
76 * Deletes the customer with the provided ID.
77 *
78 * @param IdType $customerId Customer's ID.
79 */
80 public function deleteCustomerById(IdType $customerId);
81 }