Class Account
java.lang.Object
com.broadleafcommerce.customer.domain.Account
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,Serializable
public class Account
extends Object
implements com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable
A grouping of
Customers which may represent things like a B2B business account
or a telco account.- Author:
- Chris Kittrell (ckittrell)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanA business-driven unique identifier for the accountA simple categorization that can be used to group accounts or enforce business logic<T> TgetAttribute(String key) Dynamic attributes that are a part of the account.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.getId()The context ID of the account.getName()The name of the accountThe account's parent account.The status of this account.getTaxId()The unique tax id for the account's related organizationOptional VAT Registration ID, which may be used by Tax Providers to calculate VAT taxes or apply VAT rules for B2B transactions in certain countries.inthashCode()voidsetAccountNumber(String accountNumber) A business-driven unique identifier for the accountvoidsetAccountType(String accountType) A simple categorization that can be used to group accounts or enforce business logicvoidsetAttributes(Map<String, Attribute> attributes) Dynamic attributes that are a part of the account.voidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidThe context ID of the account.voidThe name of the accountvoidsetParentAccount(AccountRef parentAccount) The account's parent account.voidThe status of this account.voidThe unique tax id for the account's related organizationvoidsetVatRegistrationId(String vatRegistrationId) Optional VAT Registration ID, which may be used by Tax Providers to calculate VAT taxes or apply VAT rules for B2B transactions in certain countries.toString()
-
Constructor Details
-
Account
public Account()
-
-
Method Details
-
getAttribute
-
getId
The context ID of the account.- Returns:
- the context ID of the account
-
getParentAccount
The account's parent account. Users with access to the parent account also have access to this account.- Returns:
- the account's parent account
-
getStatus
The status of this account. By default, the account is active.- Returns:
- the status of this account
- See Also:
-
getName
The name of the account- Returns:
- the name of the account
-
getAccountNumber
A business-driven unique identifier for the account- Returns:
- a business-driven unique identifier for the account
-
getAccountType
A simple categorization that can be used to group accounts or enforce business logic- Returns:
- a simple categorization that can be used to group accounts or enforce business logic
-
getTaxId
The unique tax id for the account's related organization- Returns:
- the unique tax id for the account's related organization
-
getVatRegistrationId
Optional VAT Registration ID, which may be used by Tax Providers to calculate VAT taxes or apply VAT rules for B2B transactions in certain countries. This field should not be used for anything except a VAT registration ID. Contact Tax Provider (e.g. Avalara) for additional information.- Returns:
- the VAT registration ID (or null)
-
getAttributes
Dynamic attributes that are a part of the account. This is an admin-entered field.- Returns:
- dynamic attributes that are a part of the account
-
getContextState
public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()A subset ofTrackinginformation to expose the context state for this object.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object.
-
setId
The context ID of the account.- Parameters:
id- the context ID of the account
-
setParentAccount
The account's parent account. Users with access to the parent account also have access to this account.- Parameters:
parentAccount- the account's parent account
-
setStatus
The status of this account. By default, the account is active.- Parameters:
status- the status of this account- See Also:
-
setName
The name of the account- Parameters:
name- the name of the account
-
setAccountNumber
A business-driven unique identifier for the account- Parameters:
accountNumber- a business-driven unique identifier for the account
-
setAccountType
A simple categorization that can be used to group accounts or enforce business logic- Parameters:
accountType- a simple categorization that can be used to group accounts or enforce business logic
-
setTaxId
The unique tax id for the account's related organization- Parameters:
taxId- the unique tax id for the account's related organization
-
setVatRegistrationId
Optional VAT Registration ID, which may be used by Tax Providers to calculate VAT taxes or apply VAT rules for B2B transactions in certain countries. This field should not be used for anything except a VAT registration ID. Contact Tax Provider (e.g. Avalara) for additional information.- Parameters:
vatRegistrationId-
-
setAttributes
Dynamic attributes that are a part of the account. This is an admin-entered field.- Parameters:
attributes- dynamic attributes that are a part of the account
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.ContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-