public class XPFCustomer extends XPFEntity
| Modifier and Type | Class and Description |
|---|---|
static class |
XPFCustomer.XPFCustomerBuilder<C extends XPFCustomer,B extends XPFCustomer.XPFCustomerBuilder<C,B>> |
XPFEntity.XPFEntityBuilder<C extends XPFEntity,B extends XPFEntity.XPFEntityBuilder<C,B>>| Modifier | Constructor and Description |
|---|---|
|
XPFCustomer(@NonNull String guid,
@NonNull String sharedId,
@NonNull Date createdDate,
String email,
@NonNull XPFCustomerStatusEnum status,
@NonNull XPFCustomerTypeEnum type,
@NonNull Map<Locale,Map<String,XPFAttributeValue>> attributeValues,
@NonNull Set<String> segments,
@NonNull boolean firstTimeBuyer) |
protected |
XPFCustomer(XPFCustomer.XPFCustomerBuilder<?,?> b) |
| Modifier and Type | Method and Description |
|---|---|
static XPFCustomer.XPFCustomerBuilder<?,?> |
builder() |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getAccountName()
Returns the account name of the customer.
|
Optional<XPFAttributeValue> |
getAttributeValueByKey(String key)
Returns the non-localized attribute value with the passed key (case-insensitive match).
|
Optional<XPFAttributeValue> |
getAttributeValueByKey(String key,
Locale locale)
Returns the attribute value with the passed key (case-insensitive match) and locale.
|
@NonNull Map<Locale,Map<String,XPFAttributeValue>> |
getAttributeValues()
The customer's attribute value maps of maps keyed by Locale and then by attribute key.
|
@NonNull Date |
getCreatedDate()
The date the customer was created.
|
String |
getEmail()
The user's email address.
|
String |
getFirstName()
Returns the first name of the customer.
|
@NonNull String |
getGuid()
The user's guid.
|
String |
getLastName()
Returns the last name of the customer.
|
String |
getPreferredCurrency()
Returns the preferred currency of the customer.
|
String |
getPreferredLocale()
Returns the preferred locale of the customer.
|
@NonNull Set<String> |
getSegments()
The segment codes that the user is associated to.
|
@NonNull String |
getSharedId()
A unique identifier for the customer that can be shared with external services.
|
@NonNull XPFCustomerStatusEnum |
getStatus()
The user's status.
|
@NonNull XPFCustomerTypeEnum |
getType()
The customer type (i.e.
|
int |
hashCode() |
@NonNull boolean |
isFirstTimeBuyer()
Is the customer a first time buyer.
|
void |
setAccountName(String accountName)
Sets the account name of the customer.
|
void |
setFirstName(String firstName)
Sets the first name of the customer.
|
void |
setLastName(String lastName)
Sets the last name of the customer.
|
void |
setPreferredCurrency(String preferredCurrency)
Sets the preferred currency of the customer.
|
void |
setPreferredLocale(String preferredLocale)
Sets the preferred locale of the customer.
|
String |
toString() |
getCustomData, getCustomDataValueprotected XPFCustomer(XPFCustomer.XPFCustomerBuilder<?,?> b)
public XPFCustomer(@NonNull
@NonNull String guid,
@NonNull
@NonNull String sharedId,
@NonNull
@NonNull Date createdDate,
String email,
@NonNull
@NonNull XPFCustomerStatusEnum status,
@NonNull
@NonNull XPFCustomerTypeEnum type,
@NonNull
@NonNull Map<Locale,Map<String,XPFAttributeValue>> attributeValues,
@NonNull
@NonNull Set<String> segments,
@NonNull
@NonNull boolean firstTimeBuyer)
public Optional<XPFAttributeValue> getAttributeValueByKey(String key, Locale locale)
key - the attribute keylocale - the attribute value localepublic Optional<XPFAttributeValue> getAttributeValueByKey(String key)
key - the attribute keypublic String getFirstName()
public void setFirstName(String firstName)
firstName - the first name to setpublic String getLastName()
public void setLastName(String lastName)
lastName - the last name to setpublic String getAccountName()
public void setAccountName(String accountName)
accountName - the account name to setpublic String getPreferredLocale()
public void setPreferredLocale(String preferredLocale)
preferredLocale - the preferred locale to setpublic String getPreferredCurrency()
public void setPreferredCurrency(String preferredCurrency)
preferredCurrency - the preferred currency to setpublic static XPFCustomer.XPFCustomerBuilder<?,?> builder()
@NonNull public @NonNull String getGuid()
@NonNull public @NonNull String getSharedId()
@NonNull public @NonNull Date getCreatedDate()
public String getEmail()
@NonNull public @NonNull XPFCustomerStatusEnum getStatus()
@NonNull public @NonNull XPFCustomerTypeEnum getType()
@NonNull public @NonNull Map<Locale,Map<String,XPFAttributeValue>> getAttributeValues()
@NonNull public @NonNull Set<String> getSegments()
@NonNull public @NonNull boolean isFirstTimeBuyer()
Copyright © 2026. All rights reserved.