Class ExistingOfferRef
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.info.ExistingOfferRef
- All Implemented Interfaces:
Serializable
Slimmed-down reference to an offer just like an
OfferRef, but is used to represent an
offer that is already applied.
This is meant to represent existing offers that are already applied, used for post-purchase flows
for subscription such as DefaultOrderFlow.SUBSCRIPTION_EDIT,
DefaultOrderFlow.SUBSCRIPTION_UPGRADE, etc.
- Since:
- 2.0.4
- Author:
- Sunny Yu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanDynamic attributes that are a part of the offer.Number of the billing period this adjustment starts being active.Number of the billing period this adjustment stops.getId()The context ID of the offer.getName()Display name for this offer.intRepresents the number of periods this adjustment has already been used.inthashCode()voidsetAttributes(Map<String, Object> attributes) Dynamic attributes that are a part of the offer.voidsetBeginPeriod(Integer beginPeriod) Number of the billing period this adjustment starts being active.voidsetEndPeriod(Integer endPeriod) Number of the billing period this adjustment stops.voidThe context ID of the offer.voidDisplay name for this offer.voidsetPeriodsAlreadyUsed(int periodsAlreadyUsed) Represents the number of periods this adjustment has already been used.toString()
-
Constructor Details
-
ExistingOfferRef
public ExistingOfferRef()
-
-
Method Details
-
getId
The context ID of the offer.- Returns:
- the context ID of the offer.
-
getName
Display name for this offer.- Returns:
- the name of this offer
-
getBeginPeriod
Number of the billing period this adjustment starts being active. -
getEndPeriod
Number of the billing period this adjustment stops. If this field is null, the adjustment is considered indefinite -
getPeriodsAlreadyUsed
public int getPeriodsAlreadyUsed()Represents the number of periods this adjustment has already been used. This is helpful to determine if the adjustment has any remaining periods. -
getAttributes
Dynamic attributes that are a part of the offer.- Returns:
- dynamic attributes that are a part of the offer
-
setId
The context ID of the offer.- Parameters:
id- the context ID of the offer.
-
setName
Display name for this offer.- Parameters:
name- the name of this offer
-
setBeginPeriod
Number of the billing period this adjustment starts being active. -
setEndPeriod
Number of the billing period this adjustment stops. If this field is null, the adjustment is considered indefinite -
setPeriodsAlreadyUsed
public void setPeriodsAlreadyUsed(int periodsAlreadyUsed) Represents the number of periods this adjustment has already been used. This is helpful to determine if the adjustment has any remaining periods. -
setAttributes
Dynamic attributes that are a part of the offer.- Parameters:
attributes- dynamic attributes that are a part of the offer
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-