Class OrderPricing
java.lang.Object
com.broadleafcommerce.order.client.domain.OrderPricing
- All Implemented Interfaces:
com.broadleafcommerce.money.CurrencyConsumer,Serializable,javax.money.CurrencySupplier
public class OrderPricing
extends Object
implements Serializable, javax.money.CurrencySupplier, com.broadleafcommerce.money.CurrencyConsumer
Pricing information for an
Order.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanjavax.money.MonetaryAmountjavax.money.CurrencyUnitThe currency unit used for the pricing of thisOrder.javax.money.MonetaryAmountThe total fees of thisOrder.javax.money.MonetaryAmountThe total fulfillment price of thisOrder, including adjustments.javax.money.MonetaryAmountThe amount of taxes that are included in the subtotal (VAT).javax.money.MonetaryAmountThe subtotal price of thisOrder.Indicates if any taxes are included in the subtotal.javax.money.MonetaryAmountgetTotal()The total price of thisOrder.javax.money.MonetaryAmountThe total tax amount for thisOrder.inthashCode()voidsetAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal) voidsetCurrency(javax.money.CurrencyUnit currency) The currency unit used for the pricing of thisOrder.voidsetFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees of thisOrder.voidsetFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The total fulfillment price of thisOrder, including adjustments.voidsetIncludedTaxAmount(javax.money.MonetaryAmount includedTaxAmount) The amount of taxes that are included in the subtotal (VAT).voidsetSubtotal(javax.money.MonetaryAmount subtotal) The subtotal price of thisOrder.voidsetTaxIncludedType(String taxIncludedType) Indicates if any taxes are included in the subtotal.voidsetTotal(javax.money.MonetaryAmount total) The total price of thisOrder.voidsetTotalTax(javax.money.MonetaryAmount totalTax) The total tax amount for thisOrder.toString()
-
Constructor Details
-
OrderPricing
public OrderPricing()
-
-
Method Details
-
getAdjustmentsTotal
public javax.money.MonetaryAmount getAdjustmentsTotal() -
getCurrency
public javax.money.CurrencyUnit getCurrency()The currency unit used for the pricing of thisOrder.- Specified by:
getCurrencyin interfacejavax.money.CurrencySupplier- Returns:
- The currency unit used for the pricing of this
Order.
-
getTotalTax
public javax.money.MonetaryAmount getTotalTax()The total tax amount for thisOrder.- Returns:
- The total tax amount for this
Order.
-
getFulfillmentTotal
public javax.money.MonetaryAmount getFulfillmentTotal()The total fulfillment price of thisOrder, including adjustments.- Returns:
- The total fulfillment price of this
Order, including adjustments.
-
getSubtotal
public javax.money.MonetaryAmount getSubtotal()The subtotal price of thisOrder. Typically calculated from summing the individual totals fromOrder.getOrderItems().- Returns:
- The subtotal price of this
Order.
-
getTotal
public javax.money.MonetaryAmount getTotal()The total price of thisOrder. Typically calculated fromgetSubtotal()-getAdjustmentsTotal()+getTotalTax()+getFulfillmentTotal().- Returns:
- The total price of this
Order.
-
getFeesTotal
public javax.money.MonetaryAmount getFeesTotal()The total fees of thisOrder. This would include the sum of allCartItem.getSubtotalWithDependentItems()for items of typeCartItem.getType()ofDefaultCartItemTypes.isExtraFee(String).- Returns:
- The total fees of this
Order.
-
getTaxIncludedType
Indicates if any taxes are included in the subtotal.- See Also:
-
TaxIncludedType
-
getIncludedTaxAmount
public javax.money.MonetaryAmount getIncludedTaxAmount()The amount of taxes that are included in the subtotal (VAT). -
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) The currency unit used for the pricing of thisOrder.- Specified by:
setCurrencyin interfacecom.broadleafcommerce.money.CurrencyConsumer- Parameters:
currency- The currency unit used for the pricing of thisOrder.
-
setTotalTax
public void setTotalTax(javax.money.MonetaryAmount totalTax) The total tax amount for thisOrder.- Parameters:
totalTax- The total tax amount for thisOrder.
-
setFulfillmentTotal
public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal) The total fulfillment price of thisOrder, including adjustments.- Parameters:
totalFulfillmentPrice- The total fulfillment price of thisOrder, including adjustments.
-
setSubtotal
public void setSubtotal(javax.money.MonetaryAmount subtotal) The subtotal price of thisOrder. Typically calculated from summing the individual totals fromOrder.getOrderItems().- Parameters:
subtotal- The subtotal price of thisOrder.
-
setAdjustmentsTotal
public void setAdjustmentsTotal(javax.money.MonetaryAmount adjustmentsTotal) The total adjustment price for alladjustmentsof anOrderand itsOrder.getOrderItems(). This should not include fulfillment adjustments since those are already included infulfillmentTotal.- Parameters:
adjustmentsTotal- The total adjustment price for alladjustmentsof anOrder.
-
setTotal
public void setTotal(javax.money.MonetaryAmount total) The total price of thisOrder. Typically calculated fromgetSubtotal()-getAdjustmentsTotal()+getTotalTax()+getFulfillmentTotal().- Parameters:
total- The total price of thisOrder.
-
setFeesTotal
public void setFeesTotal(javax.money.MonetaryAmount feesTotal) The total fees of thisOrder. This would include the sum of allCartItem.getSubtotalWithDependentItems()for items of typeCartItem.getType()ofDefaultCartItemTypes.isExtraFee(String).- Parameters:
total- The total fees of thisOrder.
-
setTaxIncludedType
Indicates if any taxes are included in the subtotal.- See Also:
-
TaxIncludedType
-
setIncludedTaxAmount
public void setIncludedTaxAmount(javax.money.MonetaryAmount includedTaxAmount) The amount of taxes that are included in the subtotal (VAT). -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-