Class PriceChangeRequest
java.lang.Object
com.broadleafcommerce.subscriptionoperation.domain.pricing.PriceChangeRequest
- All Implemented Interfaces:
Serializable
A DTO to represent changeable price fields and other price data info.
- Author:
- Julia Lopez-Pozas (jlopezpozas)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPriceChangeRequest(String id, String priceListId, javax.money.MonetaryAmount price, javax.money.MonetaryAmount recurringPrice, javax.money.MonetaryAmount usagePrice, String applicationDateType, Instant priceChangeEffectiveDate, String appliesTo, List<String> includedSegments, List<String> excludedSegments, Map<String, Object> additionalAttributes) Creates a newPriceChangeRequestinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalAttribute(String name, Object value) Takes in any additional attributes passed in the request not matching any defined properties.protected booleanbooleanReturn any additional attributes passed in the request not matching any defined properties.Map holding any additional attributes passed in the request not matching any defined properties.Indicates when the price data should be applied onto the subscription.Whether the Price Data applies to all customers or identifies users to via customer segments.List of excluded customer segments — overrides theappliesToandincludedSegmentsvalues to exclude users based on these customer segments.getId()List of included customer segments.javax.money.MonetaryAmountgetPrice()The one-time price.The date and time when the price data change is to be taken into effect.The contextId of the parent price list.javax.money.MonetaryAmountThe amount of the recurring price.javax.money.MonetaryAmountThe amount of the usage price.inthashCode()voidsetAdditionalAttributes(Map<String, Object> additionalAttributes) Map holding any additional attributes passed in the request not matching any defined properties.voidsetApplicationDateType(String applicationDateType) Indicates when the price data should be applied onto the subscription.voidsetAppliesTo(String appliesTo) Whether the Price Data applies to all customers or identifies users to via customer segments.voidsetExcludedSegments(List<String> excludedSegments) List of excluded customer segments — overrides theappliesToandincludedSegmentsvalues to exclude users based on these customer segments.voidvoidsetIncludedSegments(List<String> includedSegments) List of included customer segments.voidsetPrice(javax.money.MonetaryAmount price) The one-time price.voidsetPriceChangeEffectiveDate(Instant priceChangeEffectiveDate) The date and time when the price data change is to be taken into effect.voidsetPriceListId(String priceListId) The contextId of the parent price list.voidsetRecurringPrice(javax.money.MonetaryAmount recurringPrice) The amount of the recurring price.voidsetUsagePrice(javax.money.MonetaryAmount usagePrice) The amount of the usage price.toString()
-
Constructor Details
-
PriceChangeRequest
public PriceChangeRequest(String id, String priceListId, javax.money.MonetaryAmount price, javax.money.MonetaryAmount recurringPrice, javax.money.MonetaryAmount usagePrice, String applicationDateType, Instant priceChangeEffectiveDate, String appliesTo, List<String> includedSegments, List<String> excludedSegments, Map<String, Object> additionalAttributes) Creates a newPriceChangeRequestinstance.- Parameters:
id-priceListId- The contextId of the parent price list.price- The one-time price. This is typically used during checkout.recurringPrice- The amount of the recurring price.usagePrice- The amount of the usage price.applicationDateType- Indicates when the price data should be applied onto the subscription.priceChangeEffectiveDate- The date and time when the price data change is to be taken into effect.appliesTo- Whether the Price Data applies to all customers or identifies users to via customer segments.includedSegments- List of included customer segments.excludedSegments- List of excluded customer segments — overrides theappliesToandincludedSegmentsvalues to exclude users based on these customer segments.additionalAttributes- Map holding any additional attributes passed in the request not matching any defined properties.- See Also:
-
PriceChangeRequest
public PriceChangeRequest()
-
-
Method Details
-
addAdditionalAttribute
Takes in any additional attributes passed in the request not matching any defined properties.- Parameters:
name- Name of the additional attributevalue- Value of the additional attribute
-
getAdditionalAttribute
Return any additional attributes passed in the request not matching any defined properties.- Returns:
- any additional attributes passed in the request not matching any defined properties.
-
getId
-
getPriceListId
The contextId of the parent price list. -
getPrice
public javax.money.MonetaryAmount getPrice()The one-time price. This is typically used during checkout. -
getRecurringPrice
public javax.money.MonetaryAmount getRecurringPrice()The amount of the recurring price. -
getUsagePrice
public javax.money.MonetaryAmount getUsagePrice()The amount of the usage price. -
getApplicationDateType
Indicates when the price data should be applied onto the subscription.- See Also:
-
getPriceChangeEffectiveDate
The date and time when the price data change is to be taken into effect. -
getAppliesTo
Whether the Price Data applies to all customers or identifies users to via customer segments.- See Also:
-
getIncludedSegments
List of included customer segments. -
getExcludedSegments
List of excluded customer segments — overrides theappliesToandincludedSegmentsvalues to exclude users based on these customer segments. -
getAdditionalAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
setId
-
setPriceListId
The contextId of the parent price list. -
setPrice
public void setPrice(javax.money.MonetaryAmount price) The one-time price. This is typically used during checkout. -
setRecurringPrice
public void setRecurringPrice(javax.money.MonetaryAmount recurringPrice) The amount of the recurring price. -
setUsagePrice
public void setUsagePrice(javax.money.MonetaryAmount usagePrice) The amount of the usage price. -
setApplicationDateType
Indicates when the price data should be applied onto the subscription.- See Also:
-
setPriceChangeEffectiveDate
The date and time when the price data change is to be taken into effect. -
setAppliesTo
Whether the Price Data applies to all customers or identifies users to via customer segments.- See Also:
-
setIncludedSegments
List of included customer segments. -
setExcludedSegments
List of excluded customer segments — overrides theappliesToandincludedSegmentsvalues to exclude users based on these customer segments. -
setAdditionalAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-