Class BillingEvent
java.lang.Object
com.broadleafcommerce.billing.domain.BillingEvent
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,com.broadleafcommerce.money.CurrencyConsumer,Serializable,javax.money.CurrencySupplier
public class BillingEvent
extends Object
implements com.broadleafcommerce.data.tracking.core.ContextStateAware, javax.money.CurrencySupplier, com.broadleafcommerce.money.CurrencyConsumer, Serializable
Represents a specific instance of billing a user for a
Subscription. This domain contains
the summary fields, while BillingEventAddress, BillingEventAdjustment,
BillingEventItem, BillingEventPayment, and others store detailed information.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBillingEvent(String id, String orderRef, String orderId, String orderSrc, Date createdDate, String userRef, boolean isRecurring, Map<@Size(max=255) String, @Size(max=2000) String> additionalAttributes, String currencyCode, javax.money.CurrencyUnit currency, String alternateUserRef, String siteIdentifier, String subscriptionRef, Integer subscriptionPeriod, Date billingCycleStartDate, Date billingCycleEndDate, Date billDate, BigDecimal billTotal, BigDecimal billTotalTax, String eventNotificationChannel, String source, String sourceId, String billingEventAddressId, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanconvert(org.modelmapper.spi.MappingContext<?, ?> context) booleanName/Value pairs of additional attributes.Alternate reference to the user.Date when theBillingEventis billedDate representing the end of the window which is being billed forDate representing the start of the window which is being billed forReference to the relatedBillingEventAddressTotal bill amount including tax for thisBillingEventTotal tax created for the billAmountcom.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.The date this billing event was created onjavax.money.CurrencyUnitThe currency of charges on this BillingEventDeprecated.Notification channel for this eventgetId()The identifier for the business order for this billing event.Reference for the business order for this billing event.The source system for the business order.Multi-tenancy supportThe type of the process that created this eventThe id of the process that created this eventDescribes theSubscription'speriod that correlates to this BillingEvent.The Subscription used for thisBillingEventThe id of the user billed for this eventinthashCode()booleanvoidsetAdditionalAttributes(Map<@Size(max=255) String, @Size(max=2000) String> additionalAttributes) Name/Value pairs of additional attributes.voidsetAlternateUserRef(String alternateUserRef) Alternate reference to the user.voidsetBillDate(Date billDate) Date when theBillingEventis billedvoidsetBillingCycleEndDate(Date billingCycleEndDate) Date representing the end of the window which is being billed forvoidsetBillingCycleStartDate(Date billingCycleStartDate) Date representing the start of the window which is being billed forvoidsetBillingEventAddressId(String billingEventAddressId) Reference to the relatedBillingEventAddressvoidsetBillTotal(BigDecimal billTotal) Total bill amount including tax for thisBillingEventvoidsetBillTotalTax(BigDecimal billTotalTax) Total tax created for the billAmountvoidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetCreatedDate(Date createdDate) The date this billing event was created onvoidsetCurrency(javax.money.CurrencyUnit currency) voidsetCurrencyCode(String currencyCode) voidsetEventNotificationChannel(String eventNotificationChannel) Notification channel for this eventvoidvoidsetOrderId(String orderId) The identifier for the business order for this billing event.voidsetOrderRef(String orderRef) Reference for the business order for this billing event.voidsetOrderSrc(String orderSrc) The source system for the business order.voidsetRecurring(boolean isRecurring) Indicates whether the billing event is for a recurring subscriptionvoidsetSiteIdentifier(String siteIdentifier) Multi-tenancy supportvoidThe type of the process that created this eventvoidsetSourceId(String sourceId) The id of the process that created this eventvoidsetSubscriptionPeriod(Integer subscriptionPeriod) Describes theSubscription'speriod that correlates to this BillingEvent.voidsetSubscriptionRef(String subscriptionRef) The Subscription used for thisBillingEventvoidsetUserRef(String userRef) The id of the user billed for this eventtoString()
-
Constructor Details
-
BillingEvent
public BillingEvent() -
BillingEvent
public BillingEvent(String id, String orderRef, String orderId, String orderSrc, Date createdDate, String userRef, boolean isRecurring, Map<@Size(max=255) String, @Size(max=2000) String> additionalAttributes, String currencyCode, javax.money.CurrencyUnit currency, String alternateUserRef, String siteIdentifier, String subscriptionRef, Integer subscriptionPeriod, Date billingCycleStartDate, Date billingCycleEndDate, Date billDate, BigDecimal billTotal, BigDecimal billTotalTax, String eventNotificationChannel, String source, String sourceId, String billingEventAddressId, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
-
-
Method Details
-
isRecurring
public boolean isRecurring() -
calculateSubtotal
-
setCurrencyCode
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) - Specified by:
setCurrencyin interfacecom.broadleafcommerce.money.CurrencyConsumer
-
convert
-
getId
-
getOrderRef
Reference for the business order for this billing event. By default, this is set to the order number. -
getOrderId
The identifier for the business order for this billing event. -
getOrderSrc
The source system for the business order. -
getCreatedDate
The date this billing event was created on -
getUserRef
The id of the user billed for this event -
getAdditionalAttributes
Name/Value pairs of additional attributes. -
getCurrencyCode
Deprecated.usegetCurrency()field insteadThe currency (“USD”, “CAD”, etc.) correlated to charges on this BillingEvent -
getCurrency
public javax.money.CurrencyUnit getCurrency()The currency of charges on this BillingEvent- Specified by:
getCurrencyin interfacejavax.money.CurrencySupplier
-
getAlternateUserRef
Alternate reference to the user. Useful for third-party authentication system identifiers -
getSiteIdentifier
Multi-tenancy support -
getSubscriptionRef
The Subscription used for thisBillingEvent -
getSubscriptionPeriod
Describes theSubscription'speriod that correlates to this BillingEvent. This value is especially relevant when processing a subscription's recurring billing. If this BillingEvent does not correlate to aSubscription, then we expect this value to be null. -
getBillingCycleStartDate
Date representing the start of the window which is being billed for -
getBillingCycleEndDate
Date representing the end of the window which is being billed for -
getBillDate
Date when theBillingEventis billed -
getBillTotal
Total bill amount including tax for thisBillingEvent -
getBillTotalTax
Total tax created for the billAmount -
getEventNotificationChannel
Notification channel for this event -
getSource
The type of the process that created this event -
getSourceId
The id of the process that created this event -
getBillingEventAddressId
Reference to the relatedBillingEventAddress -
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
-
setId
-
setOrderRef
Reference for the business order for this billing event. By default, this is set to the order number. -
setOrderId
The identifier for the business order for this billing event. -
setOrderSrc
The source system for the business order. -
setCreatedDate
The date this billing event was created on -
setUserRef
The id of the user billed for this event -
setRecurring
public void setRecurring(boolean isRecurring) Indicates whether the billing event is for a recurring subscription -
setAdditionalAttributes
public void setAdditionalAttributes(Map<@Size(max=255) String, @Size(max=2000) String> additionalAttributes) Name/Value pairs of additional attributes. -
setAlternateUserRef
Alternate reference to the user. Useful for third-party authentication system identifiers -
setSiteIdentifier
Multi-tenancy support -
setSubscriptionRef
The Subscription used for thisBillingEvent -
setSubscriptionPeriod
Describes theSubscription'speriod that correlates to this BillingEvent. This value is especially relevant when processing a subscription's recurring billing. If this BillingEvent does not correlate to aSubscription, then we expect this value to be null. -
setBillingCycleStartDate
Date representing the start of the window which is being billed for -
setBillingCycleEndDate
Date representing the end of the window which is being billed for -
setBillDate
Date when theBillingEventis billed -
setBillTotal
Total bill amount including tax for thisBillingEvent -
setBillTotalTax
Total tax created for the billAmount -
setEventNotificationChannel
Notification channel for this event -
setSource
The type of the process that created this event -
setSourceId
The id of the process that created this event -
setBillingEventAddressId
Reference to the relatedBillingEventAddress -
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
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getCurrency()field instead