CustomerServiceInterface
in
Interface CustomerServiceInterface
Tags
Table of Contents
- addressIsDefaultCustomerAddress() : bool
- Checks if address is the default address of the customer.
- createNewCustomer() : Customer
- Creates a new customer with the given parameters.
- createNewGuest() : Customer
- Creates a new guest account with the given parameters.
- filterCustomers() : array<string|int, mixed>
- Filters customer records and returns an array with results.
- registreeEmailExists() : bool
- Checks if the email address of the registree already exists.
- updateCustomer() : CustomerInterface
- Updates customer data.
Methods
addressIsDefaultCustomerAddress()
Checks if address is the default address of the customer.
public
addressIsDefaultCustomerAddress(CustomerAddressInterface $customerAddress) : bool
Parameters
- $customerAddress : CustomerAddressInterface
-
Customer's address.
Return values
bool —Is the provided address the customer's default address?
createNewCustomer()
Creates a new customer with the given parameters.
public
createNewCustomer(CustomerEmailInterface $email, CustomerPasswordInterface $password, DateTime $dateOfBirth, CustomerVatNumberInterface $vatNumber, CustomerCallNumberInterface $telephoneNumber, CustomerCallNumberInterface $faxNumber, AddressBlockInterface $addressBlock, KeyValueCollection $addonValues[, CustomerNumberInterface|null $customerNumber = null ]) : Customer
Parameters
- $email : CustomerEmailInterface
-
Customer's E-Mail address.
- $password : CustomerPasswordInterface
-
Customer's password.
- $dateOfBirth : DateTime
-
Customer's date of birth.
- $vatNumber : CustomerVatNumberInterface
-
Customer's VAT number.
- $telephoneNumber : CustomerCallNumberInterface
-
Customer's telephone number.
- $faxNumber : CustomerCallNumberInterface
-
Customer's fax number.
- $addressBlock : AddressBlockInterface
-
Customer's address.
- $addonValues : KeyValueCollection
-
Customer's additional values.
- $customerNumber : CustomerNumberInterface|null = null
-
Customer's number.
Tags
Return values
Customer —Created customer.
createNewGuest()
Creates a new guest account with the given parameters.
public
createNewGuest(CustomerEmailInterface $email, DateTime $dateOfBirth, CustomerVatNumberInterface $vatNumber, CustomerCallNumberInterface $telephoneNumber, CustomerCallNumberInterface $faxNumber, AddressBlockInterface $addressBlock, KeyValueCollection $addonValues[, CustomerNumberInterface|null $customerNumber = null ]) : Customer
Parameters
- $email : CustomerEmailInterface
-
Customer's E-Mail address.
- $dateOfBirth : DateTime
-
Customer's date of birth.
- $vatNumber : CustomerVatNumberInterface
-
Customer's VAT number.
- $telephoneNumber : CustomerCallNumberInterface
-
Customer's telephone number.
- $faxNumber : CustomerCallNumberInterface
-
Customer's fax number.
- $addressBlock : AddressBlockInterface
-
Customer's address.
- $addonValues : KeyValueCollection
-
Customer's additional values.
- $customerNumber : CustomerNumberInterface|null = null
-
Customer's number.
Tags
Return values
Customer —Created guest customer.
filterCustomers()
Filters customer records and returns an array with results.
public
filterCustomers([array<string|int, mixed> $conditions = [] ][, Pager|null $pager = null ][, array<string|int, mixed> $sorters = [] ]) : array<string|int, mixed>
Example: $service->filterCustomers(['customers_id' => 1]);
Parameters
- $conditions : array<string|int, mixed> = []
-
Associative array containing the desired field and value.
- $pager : Pager|null = null
-
(Optional) Pager object with pagination information
- $sorters : array<string|int, mixed> = []
-
(Optional) array of Sorter objects with data sorting information
Return values
array<string|int, mixed> —Returns an array that contains customer objects.
registreeEmailExists()
Checks if the email address of the registree already exists.
public
registreeEmailExists(CustomerEmailInterface $email) : bool
Parameters
- $email : CustomerEmailInterface
-
Customer's E-Mail address.
Return values
bool —Does the provided E-Mail address already exist?
updateCustomer()
Updates customer data.
public
updateCustomer(CustomerInterface $customer) : CustomerInterface
Parameters
- $customer : CustomerInterface
-
Customer.
Return values
CustomerInterface —Updated customer.