java.lang.Object
com.broadleafcommerce.subscriptionoperation.domain.pricing.PriceChangeRequest
All Implemented Interfaces:
Serializable

public class PriceChangeRequest extends Object implements Serializable
A DTO to represent changeable price fields and other price data info.
Author:
Julia Lopez-Pozas (jlopezpozas)
See Also:
  • 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 new PriceChangeRequest instance.
      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 the appliesTo and includedSegments values 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

      public void addAdditionalAttribute(String name, Object value)
      Takes in any additional attributes passed in the request not matching any defined properties.
      Parameters:
      name - Name of the additional attribute
      value - Value of the additional attribute
    • getAdditionalAttribute

      public Map<String,Object> 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

      public String getId()
    • getPriceListId

      public String 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

      public String getApplicationDateType()
      Indicates when the price data should be applied onto the subscription.
      See Also:
    • getPriceChangeEffectiveDate

      public Instant getPriceChangeEffectiveDate()
      The date and time when the price data change is to be taken into effect.
    • getAppliesTo

      public String getAppliesTo()
      Whether the Price Data applies to all customers or identifies users to via customer segments.
      See Also:
    • getIncludedSegments

      public List<String> getIncludedSegments()
      List of included customer segments.
    • getExcludedSegments

      public List<String> getExcludedSegments()
      List of excluded customer segments — overrides the appliesTo and includedSegments values to exclude users based on these customer segments.
    • getAdditionalAttributes

      public Map<String,Object> getAdditionalAttributes()
      Map holding any additional attributes passed in the request not matching any defined properties.
    • setId

      public void setId(String id)
    • setPriceListId

      public void setPriceListId(String priceListId)
      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

      public void setApplicationDateType(String applicationDateType)
      Indicates when the price data should be applied onto the subscription.
      See Also:
    • setPriceChangeEffectiveDate

      public void setPriceChangeEffectiveDate(Instant priceChangeEffectiveDate)
      The date and time when the price data change is to be taken into effect.
    • setAppliesTo

      public void setAppliesTo(String appliesTo)
      Whether the Price Data applies to all customers or identifies users to via customer segments.
      See Also:
    • setIncludedSegments

      public void setIncludedSegments(List<String> includedSegments)
      List of included customer segments.
    • setExcludedSegments

      public void setExcludedSegments(List<String> excludedSegments)
      List of excluded customer segments — overrides the appliesTo and includedSegments values to exclude users based on these customer segments.
    • setAdditionalAttributes

      public void setAdditionalAttributes(Map<String,Object> additionalAttributes)
      Map holding any additional attributes passed in the request not matching any defined properties.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object