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 |
|
\DateTime
Customer's date of birth.
\Customer
Created 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 |
|
---|
\DateTime
Customer's date of birth.
\Customer
Created customer.
deleteCustomerById(\IdType $customerId)
updateCustomer(\CustomerInterface $customer) : \CustomerInterface
\CustomerInterface
Updated customer.
TODO check if the new email address is used by another record
addressBookService : \AddressBookServiceInterface
customerRepository : \CustomerRepositoryInterface
customerServiceSettings : \CustomerServiceSettingsInterface
vatNumberValidator : \VatNumberValidatorInterface