Class CustomerRef
java.lang.Object
com.broadleafcommerce.customer.client.domain.CustomerRef
- All Implemented Interfaces:
Serializable
A reference to a customer. This is primarily useful when a CSR is acting in a storefront context
and the
CustomerSegmentContextInfoCustomizer needs information about a customer the CSR
is acting on behalf of or who owns an entity being acted on by the CSR, e.g., a Quote.- Since:
- Customer Client 1.0.1, Release Train 2.1.5
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe hierarchy of accounts, from the root account to the account member's account.The ID of the account the customer belongs to.The customer's id.getEmail()The customer's email address.The customer's full name, if available.The customer's phone number.The ID of the root account the account member belongs to.The customer's username.inthashCode()booleanDefines whether or not the customer is registered.voidsetAccountHierarchy(List<String> accountHierarchy) The hierarchy of accounts, from the root account to the account member's account.voidsetAccountId(String accountId) The ID of the account the customer belongs to.voidsetCustomerId(String customerId) The customer's id.voidThe customer's email address.voidsetFullName(String fullName) The customer's full name, if available.voidsetPhoneNumber(String phoneNumber) The customer's phone number.voidsetRegistered(boolean isRegistered) Defines whether or not the customer is registered.voidsetRootAccountId(String rootAccountId) The ID of the root account the account member belongs to.voidsetUsername(String username) The customer's username.toString()
-
Constructor Details
-
CustomerRef
public CustomerRef()
-
-
Method Details
-
getCustomerId
The customer's id.- Returns:
- The customer's id.
-
getUsername
The customer's username.- Returns:
- The customer's username.
-
getEmail
The customer's email address.- Returns:
- The customer's email address.
-
getPhoneNumber
The customer's phone number.- Returns:
- The customer's phone number.
-
getFullName
The customer's full name, if available.- Returns:
- The customer's full name, if available.
-
isRegistered
public boolean isRegistered()Defines whether or not the customer is registered. If false, then the customer is considered anonymous.- Returns:
- Whether or not the customer is registered.
-
getAccountId
The ID of the account the customer belongs to.- Returns:
- the ID of the account of the customer
-
getRootAccountId
The ID of the root account the account member belongs to.- Returns:
- The ID of the root account of the account member.
-
getAccountHierarchy
The hierarchy of accounts, from the root account to the account member's account.For example, if we have this account setup, rootAcct -> subAcct (child of rootAcct) -> subSubAcct (child of subAcct), this field would be [rootAcct, subAcct, subSubAcct]. This is useful to query all the carts that belong to the same non-root account and its sub-accounts.
- Returns:
- The hierarchy of accounts, from the root account to the account member's account.
-
setCustomerId
The customer's id.- Parameters:
customerId- The customer's id.
-
setUsername
The customer's username.- Parameters:
username- The customer's username.
-
setEmail
The customer's email address.- Parameters:
email- The customer's email address.
-
setPhoneNumber
The customer's phone number.- Parameters:
username- The customer's phone number.
-
setFullName
The customer's full name, if available.- Parameters:
fullName- The customer's full name.
-
setRegistered
public void setRegistered(boolean isRegistered) Defines whether or not the customer is registered. If false, then the customer is considered anonymous.- Parameters:
isRegistered- Whether or not the customer is registered.
-
setAccountId
The ID of the account the customer belongs to.- Parameters:
accountId- the ID of the account of the customer
-
setRootAccountId
The ID of the root account the account member belongs to.- Parameters:
rootAccountId- The ID of the root account of the account member.
-
setAccountHierarchy
The hierarchy of accounts, from the root account to the account member's account.For example, if we have this account setup, rootAcct -> subAcct (child of rootAcct) -> subSubAcct (child of subAcct), this field would be [rootAcct, subAcct, subSubAcct]. This is useful to query all the carts that belong to the same non-root account and its sub-accounts.
- Parameters:
accountHierarchy- The hierarchy of accounts, from the root account to the account member's account.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-