Class Subscription
java.lang.Object
com.broadleafcommerce.subscriptionoperation.domain.Subscription
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware,com.broadleafcommerce.money.CurrencyConsumer,Serializable,javax.money.CurrencySupplier
public class Subscription
extends Object
implements com.broadleafcommerce.data.tracking.core.ContextStateAware, javax.money.CurrencySupplier, com.broadleafcommerce.money.CurrencyConsumer, Serializable
This is a domain representing a user's subscription to a service or a good. The particular line
items of the subscription are contained in
SubscriptionItem objects, while any price
changes would be held by adjustments. Changes to a subscription's
status should be followed by a SubscriptionStatusAudit to track them.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSubscription(String id, String name, String subscriptionStatus, String subscriptionNextStatus, Date nextStatusChangeDate, String nextStatusChangeReason, Date resumeDate, String rootItemRefType, String rootItemRef, String userRefType, String userRef, String alternateUserRefType, String alternateUserRef, String subscriptionSource, String subscriptionSourceRef, String secondarySourceType, String secondarySourceRef, String siteIdentifier, String billingFrequency, int periodFrequency, String periodType, String paymentStrategy, Date priorBillDate, Date nextBillDate, String preferredPaymentAccountId, javax.money.CurrencyUnit currency, String nextSubscription, String lastBillingBatchId, String lastBillingOperationStatus, Date lastBillingSuccessDate, Date createdDate, boolean chargeback, Integer nextPeriod, List<SubscriptionPeriod> periods, List<DelayedSubscriptionAction> delayedActions, List<PriceDataChange> priceDataChanges, boolean needGrantEntitlements, List<SubscriptionAdjustment> subscriptionAdjustments, boolean autoRenewalEnabled, boolean allowAutoRenewalModification, Instant startOfTermDate, Instant endOfTermDate, Integer termDurationLength, String termDurationType, String cancellationPolicyRef, String fulfillmentWorkflow, String customerTimezone, Map<String, Object> attributes, Map<String, Object> internalAttributes, Integer version, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanAlternate reference to the user.Type of the alternative user referenceMiscellaneous attributes for this subscription.Deprecated.in favor ofperiodType&periodFrequencyA reference of theCancellationPolicythat governs how this subscription would be cancelled.com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextStateA subset ofTrackinginformation to expose the context state for this object.Date this subscription was created.javax.money.CurrencyUnitCurrency of this subscriptionGets the current period for this subscription by comparingInstant.now()and eachSubscriptionPeriod's timeframe.The customer's timezone.List of delayed actions for this subscription.The end of term date for this subscription.A reference to the workflow used to fulfill the creation of, & modifications to, this subscription.getId()Miscellaneous internal attributes for this subscription.The batch id of the last billing job run for this subscriptionThe most current status of the last billing event for this subscriptionLast date this that the Billing Job succeeded billing this subscriptiongetName()Name of this subscriptionNext date this subscription will be billedThe next period this subscription will cover.Date when the next status should beginReason for the update to the next statusIf this subscription was upgraded or downgraded, holds the reference to the subscription replacing this oneDeclares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period.getPeriodDefinition(int periodNumber) getPeriodDefinition(Instant dateToCheck) Gets the period definition for this subscription by comparing the givenInstantand eachSubscriptionPeriod's timeframe.intThe frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.List tracking the Subscription's periods.The period type for the price, e.g.References an identifier of a PaymentAccount that is considered preferred for this subscription.List of price data changes for this subscriptionThe bill date for the previous periodDate this subscription will or did continue.Reference to the item id for which this subscription was provisionType of the item for which this subscription was provisionedThe secondary source to reference, e.g, an Order Item on an Order.The type of the secondary source to reference, e.g, an Order Item on an Order.Multi-tenancy supportThe start of term date for this subscription.Adjustments for this subscription.Next status for this subscriptionThis field shows from which process or user action this subscription originated.This field shows the identifier of the process or user action this subscription originated.Current status of this subscriptionThe length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.The term duration type, e.g.Reference to the user to whom this subscription belongsType of user owning this subscriptionThe version of this subscription.inthashCode()booleanThis flag indicates whether this subscription's auto-renewability can be modified after declaration on the subscription.booleanWhether this subscription automatically renews at the end of the current subscription term.booleanWhether this subscription is being cancelled due to a chargebackbooleanWhether the system has outstanding entitlements to grant on this subscriptionvoidsetAllowAutoRenewalModification(boolean allowAutoRenewalModification) This flag indicates whether this subscription's auto-renewability can be modified after declaration on the subscription.voidsetAlternateUserRef(String alternateUserRef) Alternate reference to the user.voidsetAlternateUserRefType(String alternateUserRefType) Type of the alternative user referencevoidsetAttributes(Map<String, Object> attributes) Miscellaneous attributes for this subscription.voidsetAutoRenewalEnabled(boolean autoRenewalEnabled) Whether this subscription automatically renews at the end of the current subscription term.voidsetBillingFrequency(String billingFrequency) Deprecated.in favor ofperiodType&periodFrequencyvoidsetCancellationPolicyRef(String cancellationPolicyRef) A reference of theCancellationPolicythat governs how this subscription would be cancelled.voidsetChargeback(boolean chargeback) Whether this subscription is being cancelled due to a chargebackvoidsetContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) A subset ofTrackinginformation to expose the context state for this object.voidsetCreatedDate(Date createdDate) Date this subscription was created.voidsetCurrency(javax.money.CurrencyUnit currency) Currency of this subscriptionvoidsetCurrencyCode(String currencyCode) voidsetCustomerTimezone(String customerTimezone) The customer's timezone.voidsetDelayedActions(List<DelayedSubscriptionAction> delayedActions) List of delayed actions for this subscription.voidsetEndOfTermDate(Instant endOfTermDate) The end of term date for this subscription.voidsetFulfillmentWorkflow(String fulfillmentWorkflow) A reference to the workflow used to fulfill the creation of, & modifications to, this subscription.voidvoidsetInternalAttributes(Map<String, Object> internalAttributes) Miscellaneous internal attributes for this subscription.voidsetLastBillingBatchId(String lastBillingBatchId) The batch id of the last billing job run for this subscriptionvoidsetLastBillingOperationStatus(String lastBillingOperationStatus) The most current status of the last billing event for this subscriptionvoidsetLastBillingSuccessDate(Date lastBillingSuccessDate) Last date this that the Billing Job succeeded billing this subscriptionvoidName of this subscriptionvoidsetNeedGrantEntitlements(boolean needGrantEntitlements) Whether the system has outstanding entitlements to grant on this subscriptionvoidsetNextBillDate(Date nextBillDate) Next date this subscription will be billedvoidsetNextPeriod(Integer nextPeriod) The next period this subscription will cover.voidsetNextStatusChangeDate(Date nextStatusChangeDate) Date when the next status should beginvoidsetNextStatusChangeReason(String nextStatusChangeReason) Reason for the update to the next statusvoidsetNextSubscription(String nextSubscription) If this subscription was upgraded or downgraded, holds the reference to the subscription replacing this onevoidsetPaymentStrategy(String paymentStrategy) Declares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period.voidsetPeriodFrequency(int periodFrequency) The frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.voidsetPeriods(List<SubscriptionPeriod> periods) List tracking the Subscription's periods.voidsetPeriodType(String periodType) The period type for the price, e.g.voidsetPreferredPaymentAccountId(String preferredPaymentAccountId) References an identifier of a PaymentAccount that is considered preferred for this subscription.voidsetPriceDataChanges(List<PriceDataChange> priceDataChanges) List of price data changes for this subscriptionvoidsetPriorBillDate(Date priorBillDate) The bill date for the previous periodvoidsetResumeDate(Date resumeDate) Date this subscription will or did continue.voidsetRootItemRef(String rootItemRef) Reference to the item id for which this subscription was provisionvoidsetRootItemRefType(String rootItemRefType) Type of the item for which this subscription was provisionedvoidsetSecondarySourceRef(String secondarySourceRef) The secondary source to reference, e.g, an Order Item on an Order.voidsetSecondarySourceType(String secondarySourceType) The type of the secondary source to reference, e.g, an Order Item on an Order.voidsetSiteIdentifier(String siteIdentifier) Multi-tenancy supportvoidsetStartOfTermDate(Instant startOfTermDate) The start of term date for this subscription.voidsetSubscriptionAdjustments(List<SubscriptionAdjustment> subscriptionAdjustments) Adjustments for this subscription.voidsetSubscriptionNextStatus(String subscriptionNextStatus) Next status for this subscriptionvoidsetSubscriptionSource(String subscriptionSource) This field shows from which process or user action this subscription originated.voidsetSubscriptionSourceRef(String subscriptionSourceRef) This field shows the identifier of the process or user action this subscription originated.voidsetSubscriptionStatus(String subscriptionStatus) Current status of this subscriptionvoidsetTermDurationLength(Integer termDurationLength) The length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.voidsetTermDurationType(String termDurationType) The term duration type, e.g.voidsetUserRef(String userRef) Reference to the user to whom this subscription belongsvoidsetUserRefType(String userRefType) Type of user owning this subscriptionvoidsetVersion(Integer version) The version of this subscription.toString()
-
Constructor Details
-
Subscription
public Subscription() -
Subscription
public Subscription(String id, String name, String subscriptionStatus, String subscriptionNextStatus, Date nextStatusChangeDate, String nextStatusChangeReason, Date resumeDate, String rootItemRefType, String rootItemRef, String userRefType, String userRef, String alternateUserRefType, String alternateUserRef, String subscriptionSource, String subscriptionSourceRef, String secondarySourceType, String secondarySourceRef, String siteIdentifier, String billingFrequency, int periodFrequency, String periodType, String paymentStrategy, Date priorBillDate, Date nextBillDate, String preferredPaymentAccountId, javax.money.CurrencyUnit currency, String nextSubscription, String lastBillingBatchId, String lastBillingOperationStatus, Date lastBillingSuccessDate, Date createdDate, boolean chargeback, Integer nextPeriod, List<SubscriptionPeriod> periods, List<DelayedSubscriptionAction> delayedActions, List<PriceDataChange> priceDataChanges, boolean needGrantEntitlements, List<SubscriptionAdjustment> subscriptionAdjustments, boolean autoRenewalEnabled, boolean allowAutoRenewalModification, Instant startOfTermDate, Instant endOfTermDate, Integer termDurationLength, String termDurationType, String cancellationPolicyRef, String fulfillmentWorkflow, @Nullable String customerTimezone, Map<String, Object> attributes, Map<String, Object> internalAttributes, Integer version, com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState) Deprecated.in favor ofperiodType&periodFrequencyCreates a newSubscriptioninstance.- Parameters:
id-name- Name of this subscriptionsubscriptionStatus- Current status of this subscriptionsubscriptionNextStatus- Next status for this subscriptionnextStatusChangeDate- Date when the next status should beginnextStatusChangeReason- Reason for the update to the next statusresumeDate- Date this subscription will or did continue. This is likely to be used only after a subscription was paused or stopped.rootItemRefType- Type of the item for which this subscription was provisionedrootItemRef- Reference to the item id for which this subscription was provisionuserRefType- Type of user owning this subscriptionuserRef- Reference to the user to whom this subscription belongsalternateUserRefType- Type of the alternative user referencealternateUserRef- Alternate reference to the user. Useful for third-party authentication system identifierssubscriptionSource- This field shows from which process or user action this subscription originated.subscriptionSourceRef- This field shows the identifier of the process or user action this subscription originated.secondarySourceType- The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.secondarySourceRef- The secondary source to reference, e.g, an Order Item on an Order. Optional.siteIdentifier- Multi-tenancy supportbillingFrequency- Frequency of billing for this subscriptionperiodFrequency- The frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.periodType- The period type for the price, e.g. MONTHLY, QUARTERLY, ANNUALLYpaymentStrategy- Declares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period.priorBillDate- The bill date for the previous periodnextBillDate- Next date this subscription will be billedpreferredPaymentAccountId- References an identifier of a PaymentAccount that is considered preferred for this subscription.currency- Currency of this subscriptionnextSubscription- If this subscription was upgraded or downgraded, holds the reference to the subscription replacing this onelastBillingBatchId- The batch id of the last billing job run for this subscriptionlastBillingOperationStatus- The most current status of the last billing event for this subscriptionlastBillingSuccessDate- Last date this that the Billing Job succeeded billing this subscriptioncreatedDate- Date this subscription was created. This field should not be updated or set by a request.chargeback- Whether this subscription is being cancelled due to a chargebacknextPeriod- The next period this subscription will cover. This value is related to 'beginPeriod' and 'endPeriod' fields ofSubscriptionAdjustmentandSubscriptionItemAdjustmentperiods- List tracking the Subscription's periods. Typically, this correlates to the set of periods for which a BillingEvent has been created.delayedActions- List of delayed actions for this subscription. Often, these delayed actions are related to requested actions against a subscription with aDefaultSubscriptionPaymentStrategy.PREPAIDgetPaymentStrategy()where instead of refunding the customer, the action is delayed until the end of the period, causing the next period to naturally identify the updated price.priceDataChanges- List of price data changes for this subscriptionneedGrantEntitlements- Whether the system has outstanding entitlements to grant on this subscriptionsubscriptionAdjustments- Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the objectautoRenewalEnabled- Whether this subscription automatically renews at the end of the current subscription term.allowAutoRenewalModification- This flag indicates whether this subscription's auto-renewability can be modified after declaration on the subscription.startOfTermDate- The start of term date for this subscription.endOfTermDate- The end of term date for this subscription.termDurationLength- The length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.termDurationType- The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.cancellationPolicyRef- A reference of theCancellationPolicythat governs how this subscription would be cancelled.fulfillmentWorkflow- A reference to the workflow used to fulfill the creation of, & modifications to, this subscription.customerTimezone- The customer's timezone. It's an optional field used to truncate the dates to the beginning of the day in customer's timezone. If null, UTC time is used.attributes- Miscellaneous attributes for this subscription.internalAttributes- Miscellaneous internal attributes for this subscription. Distinguished fromgetAttributes()in that this map is used for attributes that assist in the internal working of Broadleaf.version- The version of this subscription. Used for checking if the requested version of the subscription is up-to-date before saving changes. This should never be manually decremented/incremented.contextState- A subset ofTrackinginformation to expose the context state for this object.- See Also:
-
SubscriptionStatusesSubscriptionStatusessubscriptionNextStatussubscriptionNextStatusDefaultUserRefTypesDefaultUserRefTypessubscriptionSourceRefDefaultSubscriptionSourceTypesubscriptionSourcesecondarySourceRefDefaultSubscriptionSourceTypesecondarySourceTypeperiodTypeperiodFrequencyDefaultSubscriptionPaymentStrategytermDurationTypetermDurationLength
-
-
Method Details
-
setCurrencyCode
-
getCurrentPeriodDefinition
-
getCurrentPeriod
Gets the current period for this subscription by comparingInstant.now()and eachSubscriptionPeriod's timeframe. If none are found, it falls back tonextPeriod- 1.- Returns:
- The current period of the subscription.
- See Also:
-
getPeriodDefinition
Gets the period definition for this subscription by comparing the givenInstantand eachSubscriptionPeriod's timeframe. If none are found,nullis returned. In the case where there are two periods both fitting the current time, which can happen if the subscription had just lost a free trial causing the free trial period to be shortened, the period that is not shortened is used.- Returns:
- The
SubscriptionPeriodmatching the givenInstant, ornullif none
-
getPeriodDefinition
-
getFreeTrialEndDate
-
getId
-
getName
Name of this subscription -
getSubscriptionStatus
Current status of this subscription- See Also:
-
getSubscriptionNextStatus
Next status for this subscription- See Also:
-
getNextStatusChangeDate
Date when the next status should begin- See Also:
-
subscriptionNextStatus
-
getNextStatusChangeReason
Reason for the update to the next status- See Also:
-
subscriptionNextStatus
-
getResumeDate
Date this subscription will or did continue. This is likely to be used only after a subscription was paused or stopped. -
getRootItemRefType
Type of the item for which this subscription was provisioned -
getRootItemRef
Reference to the item id for which this subscription was provision -
getUserRefType
Type of user owning this subscription- See Also:
-
getUserRef
Reference to the user to whom this subscription belongs -
getAlternateUserRefType
Type of the alternative user reference- See Also:
-
getAlternateUserRef
Alternate reference to the user. Useful for third-party authentication system identifiers -
getSubscriptionSource
This field shows from which process or user action this subscription originated.- See Also:
-
subscriptionSourceRefDefaultSubscriptionSourceType
-
getSubscriptionSourceRef
This field shows the identifier of the process or user action this subscription originated.- See Also:
-
subscriptionSource
-
getSecondarySourceType
The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceRefDefaultSubscriptionSourceType
-
getSecondarySourceRef
The secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceType
-
getSiteIdentifier
Multi-tenancy support -
getBillingFrequency
Deprecated.in favor ofperiodType&periodFrequencyFrequency of billing for this subscription -
getPeriodFrequency
public int getPeriodFrequency()The frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.- See Also:
-
periodType
-
getPeriodType
The period type for the price, e.g. MONTHLY, QUARTERLY, ANNUALLY- See Also:
-
periodFrequency
-
getPaymentStrategy
Declares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period.- See Also:
-
getPriorBillDate
The bill date for the previous period -
getNextBillDate
Next date this subscription will be billed -
getPreferredPaymentAccountId
References an identifier of a PaymentAccount that is considered preferred for this subscription. -
getCurrency
public javax.money.CurrencyUnit getCurrency()Currency of this subscription- Specified by:
getCurrencyin interfacejavax.money.CurrencySupplier
-
getNextSubscription
If this subscription was upgraded or downgraded, holds the reference to the subscription replacing this one -
getLastBillingBatchId
The batch id of the last billing job run for this subscription -
getLastBillingOperationStatus
The most current status of the last billing event for this subscription -
getLastBillingSuccessDate
Last date this that the Billing Job succeeded billing this subscription -
getCreatedDate
Date this subscription was created. This field should not be updated or set by a request. -
isChargeback
public boolean isChargeback()Whether this subscription is being cancelled due to a chargeback -
getNextPeriod
The next period this subscription will cover. This value is related to 'beginPeriod' and 'endPeriod' fields ofSubscriptionAdjustmentandSubscriptionItemAdjustment -
getPeriods
List tracking the Subscription's periods. Typically, this correlates to the set of periods for which a BillingEvent has been created. -
getDelayedActions
List of delayed actions for this subscription. Often, these delayed actions are related to requested actions against a subscription with aDefaultSubscriptionPaymentStrategy.PREPAIDgetPaymentStrategy()where instead of refunding the customer, the action is delayed until the end of the period, causing the next period to naturally identify the updated price. -
getPriceDataChanges
List of price data changes for this subscription -
isNeedGrantEntitlements
public boolean isNeedGrantEntitlements()Whether the system has outstanding entitlements to grant on this subscription -
getSubscriptionAdjustments
Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the object -
isAutoRenewalEnabled
public boolean isAutoRenewalEnabled()Whether this subscription automatically renews at the end of the current subscription term. -
isAllowAutoRenewalModification
public boolean isAllowAutoRenewalModification()This flag indicates whether this subscription's auto-renewability can be modified after declaration on the subscription. -
getStartOfTermDate
The start of term date for this subscription. -
getEndOfTermDate
The end of term date for this subscription. -
getTermDurationLength
The length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.- See Also:
-
termDurationType
-
getTermDurationType
The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.- See Also:
-
termDurationLength
-
getCancellationPolicyRef
A reference of theCancellationPolicythat governs how this subscription would be cancelled. -
getFulfillmentWorkflow
A reference to the workflow used to fulfill the creation of, & modifications to, this subscription. -
getCustomerTimezone
The customer's timezone. It's an optional field used to truncate the dates to the beginning of the day in customer's timezone. If null, UTC time is used. -
getAttributes
Miscellaneous attributes for this subscription. -
getInternalAttributes
Miscellaneous internal attributes for this subscription. Distinguished fromgetAttributes()in that this map is used for attributes that assist in the internal working of Broadleaf. -
getVersion
The version of this subscription. Used for checking if the requested version of the subscription is up-to-date before saving changes. This should never be manually decremented/incremented. -
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
-
setName
Name of this subscription -
setSubscriptionStatus
Current status of this subscription- See Also:
-
setSubscriptionNextStatus
Next status for this subscription- See Also:
-
setNextStatusChangeDate
Date when the next status should begin- See Also:
-
subscriptionNextStatus
-
setNextStatusChangeReason
Reason for the update to the next status- See Also:
-
subscriptionNextStatus
-
setResumeDate
Date this subscription will or did continue. This is likely to be used only after a subscription was paused or stopped. -
setRootItemRefType
Type of the item for which this subscription was provisioned -
setRootItemRef
Reference to the item id for which this subscription was provision -
setUserRefType
Type of user owning this subscription- See Also:
-
setUserRef
Reference to the user to whom this subscription belongs -
setAlternateUserRefType
Type of the alternative user reference- See Also:
-
setAlternateUserRef
Alternate reference to the user. Useful for third-party authentication system identifiers -
setSubscriptionSource
This field shows from which process or user action this subscription originated.- See Also:
-
subscriptionSourceRefDefaultSubscriptionSourceType
-
setSubscriptionSourceRef
This field shows the identifier of the process or user action this subscription originated.- See Also:
-
subscriptionSource
-
setSecondarySourceType
The type of the secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceRefDefaultSubscriptionSourceType
-
setSecondarySourceRef
The secondary source to reference, e.g, an Order Item on an Order. Optional.- See Also:
-
secondarySourceType
-
setSiteIdentifier
Multi-tenancy support -
setBillingFrequency
Deprecated.in favor ofperiodType&periodFrequencyFrequency of billing for this subscription -
setPeriodFrequency
public void setPeriodFrequency(int periodFrequency) The frequency with which the recurring price should be charged., e.g., a value of 1 combined withperiodTypeof MONTH would indicate to a subscription service that the price should be charged every 1 month.- See Also:
-
periodType
-
setPeriodType
The period type for the price, e.g. MONTHLY, QUARTERLY, ANNUALLY- See Also:
-
periodFrequency
-
setPaymentStrategy
Declares that payments made against a subscription are going towards the goods/services rendered in the previous vs current period.- See Also:
-
setPriorBillDate
The bill date for the previous period -
setNextBillDate
Next date this subscription will be billed -
setPreferredPaymentAccountId
References an identifier of a PaymentAccount that is considered preferred for this subscription. -
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) Currency of this subscription- Specified by:
setCurrencyin interfacecom.broadleafcommerce.money.CurrencyConsumer
-
setNextSubscription
If this subscription was upgraded or downgraded, holds the reference to the subscription replacing this one -
setLastBillingBatchId
The batch id of the last billing job run for this subscription -
setLastBillingOperationStatus
The most current status of the last billing event for this subscription -
setLastBillingSuccessDate
Last date this that the Billing Job succeeded billing this subscription -
setCreatedDate
Date this subscription was created. This field should not be updated or set by a request. -
setChargeback
public void setChargeback(boolean chargeback) Whether this subscription is being cancelled due to a chargeback -
setNextPeriod
The next period this subscription will cover. This value is related to 'beginPeriod' and 'endPeriod' fields ofSubscriptionAdjustmentandSubscriptionItemAdjustment -
setPeriods
List tracking the Subscription's periods. Typically, this correlates to the set of periods for which a BillingEvent has been created. -
setDelayedActions
List of delayed actions for this subscription. Often, these delayed actions are related to requested actions against a subscription with aDefaultSubscriptionPaymentStrategy.PREPAIDgetPaymentStrategy()where instead of refunding the customer, the action is delayed until the end of the period, causing the next period to naturally identify the updated price. -
setPriceDataChanges
List of price data changes for this subscription -
setNeedGrantEntitlements
public void setNeedGrantEntitlements(boolean needGrantEntitlements) Whether the system has outstanding entitlements to grant on this subscription -
setSubscriptionAdjustments
Adjustments for this subscription. This field is used for creation from an API request and is not persisted with the object -
setAutoRenewalEnabled
public void setAutoRenewalEnabled(boolean autoRenewalEnabled) Whether this subscription automatically renews at the end of the current subscription term. -
setAllowAutoRenewalModification
public void setAllowAutoRenewalModification(boolean allowAutoRenewalModification) This flag indicates whether this subscription's auto-renewability can be modified after declaration on the subscription. -
setStartOfTermDate
The start of term date for this subscription. -
setEndOfTermDate
The end of term date for this subscription. -
setTermDurationLength
The length of the terms, e.g., if this is 36 andtermDurationTypeis MONTHS, then the user should be billed for 36 months.- See Also:
-
termDurationType
-
setTermDurationType
The term duration type, e.g. DAYS, WEEKS, MONTHS, YEARS.- See Also:
-
termDurationLength
-
setCancellationPolicyRef
A reference of theCancellationPolicythat governs how this subscription would be cancelled. -
setFulfillmentWorkflow
A reference to the workflow used to fulfill the creation of, & modifications to, this subscription. -
setCustomerTimezone
The customer's timezone. It's an optional field used to truncate the dates to the beginning of the day in customer's timezone. If null, UTC time is used. -
setAttributes
Miscellaneous attributes for this subscription. -
setInternalAttributes
Miscellaneous internal attributes for this subscription. Distinguished fromgetAttributes()in that this map is used for attributes that assist in the internal working of Broadleaf. -
setVersion
The version of this subscription. Used for checking if the requested version of the subscription is up-to-date before saving changes. This should never be manually decremented/incremented. -
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
-
periodType&periodFrequency