Class CustomerWriteService
This class provides methods for creating and deleting customer data
| category |
System |
|---|---|
| package |
Customer |
| implements |
CustomerWriteServiceInterface |
__construct(\AddressBookServiceInterface $addressBookService, \CustomerRepositoryInterface $customerRepository, \CustomerServiceSettingsInterface $customerServiceSettings, \VatNumberValidatorInterface $vatNumberValidator, \DeleteHistoryWriteService $deleteHistoryWriteService)
createNewGuest(\CustomerEmailInterface $email, \DateTime $dateOfBirth, \CustomerVatNumberInterface $vatNumber, \CustomerCallNumberInterface $telephoneNumber, \CustomerCallNumberInterface $faxNumber, \AddressBlockInterface $addressBlock, \KeyValueCollection $addonValues) : \Customer
| deprecated |
use createNewRegistree() with an instance of CustomerGuestPassword |
|---|---|
| Throws |
|
\DateTimeCustomer's date of birth.
\CustomerCreated guest customer.
createNewRegistree(\CustomerEmailInterface $email, \CustomerPasswordInterface $password, \DateTime $dateOfBirth, \CustomerVatNumberInterface $vatNumber, \CustomerCallNumberInterface $telephoneNumber, \CustomerCallNumberInterface $faxNumber, \AddressBlockInterface $addressBlock, \KeyValueCollection $addonValues) : \Customer
Will create a guest account if $password is an instance of CustomerGuestPassword.
| Throws |
|
|---|
\DateTimeCustomer's date of birth.
\CustomerCreated customer.
deleteCustomerById(\IdType $customerId)
updateCustomer(\CustomerInterface $customer) : \CustomerInterface
\CustomerInterfaceUpdated customer.
TODO check if the new email address is used by another record
addressBookService : \AddressBookServiceInterface
customerRepository : \CustomerRepositoryInterface
customerServiceSettings : \CustomerServiceSettingsInterface
vatNumberValidator : \VatNumberValidatorInterface