Class UsagePriceDetail

java.lang.Object
com.broadleafcommerce.pricing.client.domain.UsagePriceDetail
All Implemented Interfaces:
Serializable, Comparable<UsagePriceDetail>

public class UsagePriceDetail extends Object implements Comparable<UsagePriceDetail>, Serializable
Represents the details related to a usage price including the units.
Since:
Pricing Client 2.0.3
Author:
Nathan Moore (nathandmoore)
See Also:
  • Constructor Details

    • UsagePriceDetail

      public UsagePriceDetail()
  • Method Details

    • compareTo

      public int compareTo(@Nullable UsagePriceDetail o)
      Specified by:
      compareTo in interface Comparable<UsagePriceDetail>
    • getPrice

      public javax.money.MonetaryAmount getPrice()
      The price to charge for usage.
    • getAmount

      public BigDecimal getAmount()
      The amount of units to charge for, e.g., charge $2 for every 1 GB used.
    • getUnits

      public String getUnits()
      The units (e.g., minutes, texts, GB) defining what is getting used against which to charge the amount.
    • setPrice

      public void setPrice(javax.money.MonetaryAmount price)
      The price to charge for usage.
    • setAmount

      public void setAmount(BigDecimal amount)
      The amount of units to charge for, e.g., charge $2 for every 1 GB used.
    • setUnits

      public void setUnits(String units)
      The units (e.g., minutes, texts, GB) defining what is getting used against which to charge the amount.
    • 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