Customer
in package
implements
CustomerInterface
Class Customer
This class is used for managing customer data
Tags
Interfaces, Classes and Traits
- CustomerInterface
- Interface CustomerInterface
Table of Contents
- FALLBACK_PASSWORD_ENTROPY_SIZE = 128
- $addonValues : EditableKeyValueCollection
- Addons collection.
- $company : CustomerCompanyInterface
- $customerNumber : CustomerNumberInterface
- Customer number.
- $customerStatusId : int
- Customer status ID.
- $dateOfBirth : DateTime
- Customer date of birth.
- $defaultAddress : CustomerAddressInterface
- Customer default address.
- $email : CustomerEmailInterface
- Customer E-Mail address.
- $faxNumber : CustomerCallNumberInterface
- Customer fax number.
- $firstname : CustomerFirstnameInterface
- Customer first name.
- $gender : CustomerGenderInterface
- Customer gender.
- $id : int
- Customer ID.
- $isGuest : bool
- Customer guest status.
- $lastname : CustomerLastnameInterface
- Customer last name.
- $password : CustomerPasswordInterface
- Customer password.
- $telephoneNumber : CustomerCallNumberInterface
- Customer call number.
- $vatNumber : CustomerVatNumberInterface
- Customer VAT number.
- $vatNumberStatus : int
- Customer VAT number status.
- __construct() : mixed
- Constructor of the class Customer
- addAddonValues() : GXEngineProduct
- Add Addon Values
- deleteAddonValue() : GXEngineProduct
- Delete Addon Value
- getAddonValue() : string
- Get Addon Value
- getAddonValueContainerId() : int
- Returns the customer ID.
- getAddonValues() : KeyValueCollection
- Get Addon Values
- getCompany() : CustomerCompanyInterface
- getCustomerNumber() : string
- Returns the customer's number.
- getDateOfBirth() : DateTime
- Returns the customer's date of birth.
- getDefaultAddress() : CustomerAddressInterface
- Returns the customer's default address.
- getEmail() : CustomerEmailInterface
- Returns the customer's email.
- getFaxNumber() : CustomerCallNumberInterface
- Returns the customer's fax number.
- getFirstname() : CustomerFirstnameInterface
- Returns the customer's first name.
- getGender() : CustomerGenderInterface
- Returns the customer's gender.
- getId() : int
- Returns the customer's ID.
- getLastname() : CustomerLastnameInterface
- Returns the customer's last name.
- getPassword() : CustomerPasswordInterface
- Returns the customer's password.
- getStatusId() : int
- Returns the customer's status ID.
- getTelephoneNumber() : CustomerCallNumberInterface
- Returns the customer's telephone number.
- getVatNumber() : CustomerVatNumberInterface
- Returns the customer's VAT number.
- getVatNumberStatus() : int
- Returns the customer's VAT number status.
- isGuest() : bool
- Checks if customer is a guest.
- setAddonValue() : GXEngineProduct
- Set Addon Value
- setCompany() : void
- setCustomerNumber() : mixed
- Sets the customer's number.
- setDateOfBirth() : mixed
- Sets the customer's date of birth.
- setDefaultAddress() : mixed
- Sets the customer's default address.
- setEmail() : mixed
- Sets the customer's email.
- setFaxNumber() : mixed
- Sets the customer's fax number.
- setFirstname() : mixed
- Sets the customer's first name.
- setGender() : mixed
- Sets the customer's gender.
- setGuest() : mixed
- Sets the customer's guest status.
- setId() : mixed
- Sets the customer's ID.
- setLastname() : mixed
- Sets the customer's last name.
- setPassword() : mixed
- Sets the customer's password.
- setStatusId() : mixed
- Sets the customer's status ID.
- setTelephoneNumber() : mixed
- Sets the customer's telephone number.
- setVatNumber() : mixed
- Sets the customer's VAT number.
- setVatNumberStatus() : mixed
- Sets the customer's VAT number status.
- makeFallbackPassword() : NonEmptyStringType
- Create a default password using the best entropy source available.
Constants
FALLBACK_PASSWORD_ENTROPY_SIZE
public
mixed
FALLBACK_PASSWORD_ENTROPY_SIZE
= 128
Properties
$addonValues
Addons collection.
protected
EditableKeyValueCollection
$addonValues
$company
protected
CustomerCompanyInterface
$company
$customerNumber
Customer number.
protected
CustomerNumberInterface
$customerNumber
$customerStatusId
Customer status ID.
protected
int
$customerStatusId
= 1
$dateOfBirth
Customer date of birth.
protected
DateTime
$dateOfBirth
$defaultAddress
Customer default address.
protected
CustomerAddressInterface
$defaultAddress
Customer E-Mail address.
protected
CustomerEmailInterface
$email
$faxNumber
Customer fax number.
protected
CustomerCallNumberInterface
$faxNumber
$firstname
Customer first name.
protected
CustomerFirstnameInterface
$firstname
$gender
Customer gender.
protected
CustomerGenderInterface
$gender
$id
Customer ID.
protected
int
$id
$isGuest
Customer guest status.
protected
bool
$isGuest
= alse
$lastname
Customer last name.
protected
CustomerLastnameInterface
$lastname
$password
Customer password.
protected
CustomerPasswordInterface
$password
$telephoneNumber
Customer call number.
protected
CustomerCallNumberInterface
$telephoneNumber
$vatNumber
Customer VAT number.
protected
CustomerVatNumberInterface
$vatNumber
$vatNumberStatus
Customer VAT number status.
protected
int
$vatNumberStatus
= 0
Methods
__construct()
Constructor of the class Customer
public
__construct() : mixed
Return values
mixed —addAddonValues()
Add Addon Values
public
addAddonValues(KeyValueCollection $keyValueCollection) : GXEngineProduct
Adds a key value collection to a product.
Parameters
- $keyValueCollection : KeyValueCollection
-
The key value collection to add.
Return values
GXEngineProduct —Same instance for chained method calls.
deleteAddonValue()
Delete Addon Value
public
deleteAddonValue(StringType $key) : GXEngineProduct
Deletes an addon value of a product.
Parameters
- $key : StringType
-
The key of the addon value to delete.
Tags
Return values
GXEngineProduct —Same instance for chained method calls.
getAddonValue()
Get Addon Value
public
getAddonValue(StringType $key) : string
Returns the addon value of a product, depending on the provided key.
Parameters
- $key : StringType
-
The key of the addon value to return.
Tags
Return values
string —The addon value.
getAddonValueContainerId()
Returns the customer ID.
public
getAddonValueContainerId() : int
Return values
int —getAddonValues()
Get Addon Values
public
getAddonValues() : KeyValueCollection
Returns a key value collection of the product.
Return values
KeyValueCollection —The key value collection.
getCompany()
public
getCompany() : CustomerCompanyInterface
Return values
CustomerCompanyInterface —getCustomerNumber()
Returns the customer's number.
public
getCustomerNumber() : string
Return values
string —customerNumber Customer's number.
getDateOfBirth()
Returns the customer's date of birth.
public
getDateOfBirth() : DateTime
Return values
DateTime —date of birth Customer's date of birth.
getDefaultAddress()
Returns the customer's default address.
public
getDefaultAddress() : CustomerAddressInterface
Return values
CustomerAddressInterface —Customer's default address.
getEmail()
Returns the customer's email.
public
getEmail() : CustomerEmailInterface
Return values
CustomerEmailInterface —Customer's email.
getFaxNumber()
Returns the customer's fax number.
public
getFaxNumber() : CustomerCallNumberInterface
Return values
CustomerCallNumberInterface —Customer's fax number.
getFirstname()
Returns the customer's first name.
public
getFirstname() : CustomerFirstnameInterface
Return values
CustomerFirstnameInterface —Customer's first name.
getGender()
Returns the customer's gender.
public
getGender() : CustomerGenderInterface
Return values
CustomerGenderInterface —Customer's gender.
getId()
Returns the customer's ID.
public
getId() : int
Return values
int —Customer's ID.
getLastname()
Returns the customer's last name.
public
getLastname() : CustomerLastnameInterface
Return values
CustomerLastnameInterface —Customer's last name.
getPassword()
Returns the customer's password.
public
getPassword() : CustomerPasswordInterface
Return values
CustomerPasswordInterface —Customer's password.
getStatusId()
Returns the customer's status ID.
public
getStatusId() : int
Return values
int —customerStatusId Customer's status ID.
getTelephoneNumber()
Returns the customer's telephone number.
public
getTelephoneNumber() : CustomerCallNumberInterface
Return values
CustomerCallNumberInterface —Customer's telephone number.
getVatNumber()
Returns the customer's VAT number.
public
getVatNumber() : CustomerVatNumberInterface
Return values
CustomerVatNumberInterface —Customer's VAT number.
getVatNumberStatus()
Returns the customer's VAT number status.
public
getVatNumberStatus() : int
Return values
int —Customer's VAT number status.
isGuest()
Checks if customer is a guest.
public
isGuest() : bool
Return values
bool —Is customer a guest?
setAddonValue()
Set Addon Value
public
setAddonValue(StringType $key, StringType $value) : GXEngineProduct
Sets the addon value of a product.
Parameters
- $key : StringType
-
The key for the addon value.
- $value : StringType
-
The value for the addon.
Return values
GXEngineProduct —Same instance for chained method calls.
setCompany()
public
setCompany(CustomerCompanyInterface $company) : void
Parameters
- $company : CustomerCompanyInterface
Return values
void —setCustomerNumber()
Sets the customer's number.
public
setCustomerNumber(CustomerNumberInterface $customerNumber) : mixed
Parameters
- $customerNumber : CustomerNumberInterface
-
Customer's number.
Return values
mixed —setDateOfBirth()
Sets the customer's date of birth.
public
setDateOfBirth(DateTime $dateOfBirth) : mixed
Parameters
- $dateOfBirth : DateTime
-
date of birth Customer's date of birth.
Return values
mixed —setDefaultAddress()
Sets the customer's default address.
public
setDefaultAddress(CustomerAddressInterface $address) : mixed
Parameters
- $address : CustomerAddressInterface
-
Customer's default address.
Return values
mixed —setEmail()
Sets the customer's email.
public
setEmail(CustomerEmailInterface $email) : mixed
Parameters
- $email : CustomerEmailInterface
-
Customer's email.
Return values
mixed —setFaxNumber()
Sets the customer's fax number.
public
setFaxNumber(CustomerCallNumberInterface $faxNumber) : mixed
Parameters
- $faxNumber : CustomerCallNumberInterface
-
Customer's fax number.
Return values
mixed —setFirstname()
Sets the customer's first name.
public
setFirstname(CustomerFirstnameInterface $firstname) : mixed
Parameters
- $firstname : CustomerFirstnameInterface
-
Customer's first name.
Return values
mixed —setGender()
Sets the customer's gender.
public
setGender(CustomerGenderInterface $gender) : mixed
Parameters
- $gender : CustomerGenderInterface
-
Customer's gender.
Return values
mixed —setGuest()
Sets the customer's guest status.
public
setGuest(bool $p_isPGuest) : mixed
Parameters
- $p_isPGuest : bool
-
Customer's guest status.
Tags
Return values
mixed —setId()
Sets the customer's ID.
public
setId(IdType $id) : mixed
Parameters
- $id : IdType
-
customerId Customer ID.
Tags
Return values
mixed —setLastname()
Sets the customer's last name.
public
setLastname(CustomerLastnameInterface $lastname) : mixed
Parameters
- $lastname : CustomerLastnameInterface
-
Customer's last name.
Return values
mixed —setPassword()
Sets the customer's password.
public
setPassword(CustomerPasswordInterface $password) : mixed
Parameters
- $password : CustomerPasswordInterface
-
Customer's password.
Return values
mixed —setStatusId()
Sets the customer's status ID.
public
setStatusId(int $p_statusId) : mixed
Parameters
- $p_statusId : int
-
Customer's status ID.
Tags
Return values
mixed —setTelephoneNumber()
Sets the customer's telephone number.
public
setTelephoneNumber(CustomerCallNumberInterface $telephoneNumber) : mixed
Parameters
- $telephoneNumber : CustomerCallNumberInterface
-
Customer's telephone number.
Return values
mixed —setVatNumber()
Sets the customer's VAT number.
public
setVatNumber(CustomerVatNumberInterface $vatNumber) : mixed
Parameters
- $vatNumber : CustomerVatNumberInterface
-
Customer's VAT number.
Return values
mixed —setVatNumberStatus()
Sets the customer's VAT number status.
public
setVatNumberStatus(int $p_vatNumberStatus) : mixed
Parameters
- $p_vatNumberStatus : int
-
Customer's VAT number status.
Return values
mixed —makeFallbackPassword()
Create a default password using the best entropy source available.
protected
makeFallbackPassword() : NonEmptyStringType