public class RangePricing
extends java.lang.Object
implements java.lang.Comparable
Behavior
This class is used to gather data related to pricing a product across possible multiple currencies for specific range of purchased units. It is currently used to help abstract the data within the Commerce Accelerator pricing tool in such a way as to allow the developer to more easily implement product/sku pricing.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT |
Constructor and Description |
---|
RangePricing(java.lang.Double startUnits, java.util.Map currencyPrices)
Creates an instance of PricingDataBean.
|
Modifier and Type | Method and Description |
---|---|
int | compareTo(java.lang.Object rangePricingToCompare)
Casts the object passed to a RangePricing object and returns -1 if this object has a lower starting unit value than cast object, 0 if they are the same, and 1 if this object has a higher starting unit value than the one to which it is being compared.
|
int | compareTo(RangePricing rangePricingToCompare)
Returns -1 if the object has a lower starting unit value than rangePricingToCompare, 0 if they are the same, and 1 if the object has a higher starting unit value than the one to which it is being compared.
|
java.math.BigDecimal | getCurrencyPrice(java.lang.String currency)
Returns the price per unit for this unit range in the currency passed.
|
java.util.Map | getCurrencyPrices()
Returns the map of the price per unit for this unit range associated to a currency.
|
java.lang.Double | getStartingNumberOfUnits()
Returns starting number of units for this unit range.
|
public static final java.lang.String COPYRIGHT
public RangePricing(java.lang.Double startUnits, java.util.Map currencyPrices)
public int compareTo(RangePricing rangePricingToCompare)
public int compareTo(java.lang.Object rangePricingToCompare)
public java.math.BigDecimal getCurrencyPrice(java.lang.String currency)
public java.util.Map getCurrencyPrices()
public java.lang.Double getStartingNumberOfUnits()