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 boolean
boolean
javax.money.MonetaryAmount
javax.money.CurrencyUnit
The currency unit used for the pricing of thisOrder
.javax.money.MonetaryAmount
The total fees of thisOrder
.javax.money.MonetaryAmount
The total fulfillment price of thisOrder
, including adjustments.javax.money.MonetaryAmount
The amount of taxes that are included in the subtotal (VAT).javax.money.MonetaryAmount
The subtotal price of thisOrder
.Indicates if any taxes are included in the subtotal.javax.money.MonetaryAmount
getTotal()
The total price of thisOrder
.javax.money.MonetaryAmount
The total tax amount for thisOrder
.int
hashCode()
void
setAdjustmentsTotal
(javax.money.MonetaryAmount adjustmentsTotal) void
setCurrency
(javax.money.CurrencyUnit currency) The currency unit used for the pricing of thisOrder
.void
setFeesTotal
(javax.money.MonetaryAmount feesTotal) The total fees of thisOrder
.void
setFulfillmentTotal
(javax.money.MonetaryAmount fulfillmentTotal) The total fulfillment price of thisOrder
, including adjustments.void
setIncludedTaxAmount
(javax.money.MonetaryAmount includedTaxAmount) The amount of taxes that are included in the subtotal (VAT).void
setSubtotal
(javax.money.MonetaryAmount subtotal) The subtotal price of thisOrder
.void
setTaxIncludedType
(String taxIncludedType) Indicates if any taxes are included in the subtotal.void
setTotal
(javax.money.MonetaryAmount total) The total price of thisOrder
.void
setTotalTax
(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:
getCurrency
in 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:
setCurrency
in 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 alladjustments
of anOrder
and itsOrder.getOrderItems()
. This should not include fulfillment adjustments since those are already included infulfillmentTotal
.- Parameters:
adjustmentsTotal
- The total adjustment price for alladjustments
of 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
-