Class ResolveCustomerSegmentsRequest
- All Implemented Interfaces:
Serializable
CustomerSegments
matching a given
context. It is expected to contain any useful details about a user to evaluate
rule-based
segments against.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The hierarchy of accounts, from the root account to the account member's account.The ID of the account the user belongs to.Additional, arbitrary request attributes.getEmail()
The user's email.The user's full name.The user's phone number.List of ids of any prefetchedCustomerSegments
to evaluate whether they apply to the request.The ID of the root account the account member belongs to.The user's id.The user's username.int
hashCode()
boolean
Defines whether the user is registered.void
setAccountHierarchy
(List<String> accountHierarchy) The hierarchy of accounts, from the root account to the account member's account.void
setAccountId
(String accountId) The ID of the account the user belongs to.void
setAttributes
(Map<String, Object> attributes) Additional, arbitrary request attributes.void
The user's email.void
setFullName
(String fullName) The user's full name.void
setPhoneNumber
(String phoneNumber) The user's phone number.void
setPrefetchedSegmentIdsToEvaluate
(List<String> prefetchedSegmentIdsToEvaluate) List of ids of any prefetchedCustomerSegments
to evaluate whether they apply to the request.void
setRegistered
(boolean registered) Defines whether the user is registered.void
setRootAccountId
(String rootAccountId) The ID of the root account the account member belongs to.void
The user's id.void
setUsername
(String username) The user's username.toString()
-
Constructor Details
-
ResolveCustomerSegmentsRequest
public ResolveCustomerSegmentsRequest()
-
-
Method Details
-
getUserId
The user's id.- Returns:
- The user's id.
-
getUsername
The user's username.- Returns:
- The user's username.
-
getEmail
The user's email.- Returns:
- The user's email.
-
getPhoneNumber
The user's phone number.- Returns:
- The user's phone number.
-
getFullName
The user's full name.- Returns:
- The user's full name.
-
isRegistered
public boolean isRegistered()Defines whether the user is registered. If false, then the user is considered anonymous.- Returns:
- Whether the user is registered.
-
getAccountId
The ID of the account the user belongs to.- Returns:
- The ID of the account of the user.
-
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 have queries include sub-accounts.
- Returns:
- The hierarchy of accounts, from the root account to the account member's account.
-
getAttributes
Additional, arbitrary request attributes.- Returns:
- Additional, arbitrary request attributes.
-
getPrefetchedSegmentIdsToEvaluate
List of ids of any prefetchedCustomerSegments
to evaluate whether they apply to the request. This list will be used instead of looking up all rule-based or directly assigned customer segments.Typically, this will only include the ids of
rule-based
segments with evaluation typeDefaultCustomerSegmentRuleEvaluationType.REAL_TIME
as other segments should already be known from the user's auth token claims. -
setUserId
The user's id.- Parameters:
userId
- The user's id.
-
setUsername
The user's username.- Parameters:
username
- The user's username.
-
setEmail
The user's email.- Parameters:
username
- The user's email.
-
setPhoneNumber
The user's phone number.- Parameters:
username
- The user's phone number.
-
setFullName
The user's full name.- Parameters:
fullName
- The user's full name.
-
setRegistered
public void setRegistered(boolean registered) Defines whether the user is registered. If false, then the user is considered anonymous.- Parameters:
registered
- Whether the user is registered.
-
setAccountId
The ID of the account the user belongs to.- Parameters:
accountId
- The ID of the account of the user.
-
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 have queries include sub-accounts.
- Parameters:
accountHierarchy
- The hierarchy of accounts, from the root account to the account member's account.
-
setAttributes
Additional, arbitrary request attributes.- Parameters:
additionalAttributes
- Additional, arbitrary request attributes.
-
setPrefetchedSegmentIdsToEvaluate
List of ids of any prefetchedCustomerSegments
to evaluate whether they apply to the request. This list will be used instead of looking up all rule-based or directly assigned customer segments.Typically, this will only include the ids of
rule-based
segments with evaluation typeDefaultCustomerSegmentRuleEvaluationType.REAL_TIME
as other segments should already be known from the user's auth token claims. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-