Class OrderFulfillmentItem

java.lang.Object
com.broadleafcommerce.order.client.domain.OrderFulfillmentItem
All Implemented Interfaces:
Serializable

public class OrderFulfillmentItem extends Object implements Serializable
Represents an OrderItem designated to a particular OrderFulfillment for fulfillment.
Author:
Chad Harchar (charchar), Samarth Dhruva (samarthd)
See Also:
  • Constructor Details

    • OrderFulfillmentItem

      public OrderFulfillmentItem()
  • Method Details

    • getId

      public String getId()
      The context ID of this fulfillment item.
      Returns:
      the context ID of the fulfillment item
    • getReferenceNumber

      public String getReferenceNumber()
      The reference number for this fulfillment item. This reference number should stay the same even if this item is split, so it could be shared between multiple items.
      Returns:
      The reference number for this fulfillment item.
    • getOrderFulfillment

      public OrderFulfillment getOrderFulfillment()
      The owning order fulfillment of this item.
      Returns:
      the order fulfillment that owns this item
    • getOrderItemId

      public String getOrderItemId()
      The id of the OrderItem to be represented by this fulfillment item.
      Returns:
      the id of the order item to be represented by this fulfillment item
    • getQuantity

      public int getQuantity()
      The quantity of the item to be fulfilled by this fulfillment. This isn't necessarily going to equal OrderItem.getQuantity() since an OrderItem can be split across multiple OrderFulfillments.
      Returns:
      the quantity of the item to be fulfilled by this fulfillment
    • getUnitMerchandisePrice

      public javax.money.MonetaryAmount getUnitMerchandisePrice()
      The individual unit price for the merchandise. This is the same as OrderItem.unitPrice.
      Returns:
      The individual unit price for the merchandise
    • getMerchandiseSubtotal

      public javax.money.MonetaryAmount getMerchandiseSubtotal()
      The unitMerchandisePrice multiplied by quantity.
      Returns:
      the unit merchandise price multiplied by quantity
    • getMerchandiseAdjustmentsTotal

      public javax.money.MonetaryAmount getMerchandiseAdjustmentsTotal()
      The total of all the item adjustments for the merchandise. Does not include proratedOrderAdjustments.
      Returns:
      The total adjustments for the merchandise
    • getMerchandiseTotal

      public javax.money.MonetaryAmount getMerchandiseTotal()
      The merchandise total for the item quantity, including merchandiseSubtotal and item merchandiseAdjustmentsTotal. Does not include proratedOrderAdjustments.
      Returns:
      the unit price of the related OrderItem multiplied by quantity
    • getMerchandiseRefundAmount

      public javax.money.MonetaryAmount getMerchandiseRefundAmount()
      The merchandise amount to refund when this item is returned, note that prorated order adjustments are included. For example, if this item has a merchandise amount of $10 and has a prorated order adjustment of $2, the merchandise refund amount would be $8.

      This amount is calculated by default when Order is being generated and populated from the corresponding OrderItem.

      Returns:
      the merchandise amount to refund when this item is returned
      See Also:
    • getFulfillmentRefundAmount

      public javax.money.MonetaryAmount getFulfillmentRefundAmount()
      The fulfillment amount to refund when this item is returned, note that prorated fulfillment group adjustments are included. For example, if this item has a fulfillment amount of $5 and has a prorated fulfillment group adjustment of $1, the fulfillment refund amount would be $4.

      This amount is calculated by default when OrderFulfillment is being generated and populated from the corresponding OrderFulfillmentItem.

      Returns:
      the fulfillment amount to refund when this item is returned
    • getProratedOrderAdjustments

      public javax.money.MonetaryAmount getProratedOrderAdjustments()
      The amount prorated to this item from order adjustments.
      Returns:
      the amount prorated to this item from order adjustments
    • getMerchandiseTaxTotal

      public javax.money.MonetaryAmount getMerchandiseTaxTotal()
      The total tax of the item merchandise based on the price of the related OrderItem.
      Returns:
      the total tax for the item merchandise based on the price of the related OrderItem
    • getUnitFulfillmentCharge

      public javax.money.MonetaryAmount getUnitFulfillmentCharge()
      The unit shipping charge of each item before adjustments are applied. This is like OrderItem.getUnitPrice() but for fulfillment.
      Returns:
      the shipping charge of this OrderItem before adjustments are applied
    • getFulfillmentAdjustmentsTotal

      public javax.money.MonetaryAmount getFulfillmentAdjustmentsTotal()
      The total of all the item fulfillment adjustments for this item.
      Returns:
      the total item fulfillment adjustments for this item
    • getProratedOrderFulfillmentAdjustments

      public javax.money.MonetaryAmount getProratedOrderFulfillmentAdjustments()
      The amount prorated to this item from order fulfillment adjustments.
      Returns:
      the amount prorated to this item from order fulfillment adjustments
    • getFulfillmentTotal

      public javax.money.MonetaryAmount getFulfillmentTotal()
      The total fulfillment price of this item, including adjustments. This does not include taxes.
      Returns:
      the total fulfillment price of this item, including adjustments
    • getProratedFulfillmentCharge

      public javax.money.MonetaryAmount getProratedFulfillmentCharge()
      The prorated shipping charge for this fulfillment item before adjustments are applied, derived from the FulfillmentGroup.getGroupFulfillmentPriceBeforeAdjustments(). This does not include additional shipping charges specific to the item.
      Returns:
      The prorated shipping charge for this item, not including adjustments.
    • getFulfillmentAdjustments

      public List<com.broadleafcommerce.order.common.domain.Adjustment> getFulfillmentAdjustments()
      Adjustments to item fulfillment pricing that should be applied to the total of unitFulfillmentCharge.
      Returns:
      adjustments to item fulfillment pricing that should be applied to the total of unitFulfillmentCharge
    • isAvailableOnline

      public boolean isAvailableOnline()
      Whether or not this product is available online - ie inventory is available somewhere to fulfill this product.
      Returns:
      Whether or not this product is available online.
    • getInventoryCheckStrategy

      public String getInventoryCheckStrategy()
      The inventory check strategy of the item. This value helps to determine when an inventory check is required.
      Returns:
      The inventory check strategy of the item.
    • getInventoryReservationStrategy

      public String getInventoryReservationStrategy()
      The reservation strategy of the item. This value helps to determine when an inventory reservation is required.
      Returns:
      The reservation strategy of the item.
    • getTaxDetails

      public List<OrderFulfillmentItemTaxDetail> getTaxDetails()
      The tax details for this fulfillment item. This is a granular breakdown of tax, describing individual taxes, such as city, state, county, etc. The totals here should equal merchandiseTaxTotal.
      Returns:
      The tax details for this fulfillment item
    • getIncludedMerchandiseTax

      public javax.money.MonetaryAmount getIncludedMerchandiseTax()
      The amount of merchandise taxes that are included in the item subtotal (VAT).
    • getIncludedFulfillmentTax

      public javax.money.MonetaryAmount getIncludedFulfillmentTax()
      The amount of fulfillment taxes that are included in the item subtotal (VAT).
    • getNonIncludedMerchandiseTax

      public javax.money.MonetaryAmount getNonIncludedMerchandiseTax()
      The amount of merchandise taxes that are not included in the item subtotal.
    • getNonIncludedFulfillmentTax

      public javax.money.MonetaryAmount getNonIncludedFulfillmentTax()
      The amount of fulfillment taxes that are not included in the item subtotal.
    • getNonIncludedTaxTotal

      public javax.money.MonetaryAmount getNonIncludedTaxTotal()
      The total amount of taxes that are not included in the item subtotal.
    • getItemTotal

      public javax.money.MonetaryAmount getItemTotal()
      The total amount attributed to this fulfillment item. This is the merchandiseTotal including proratedOrderAdjustments and the nonIncludedTaxTotal.
    • getAttributes

      public Map<String,Object> getAttributes()
      Miscellaneous attributes for this fulfillment item.
      Returns:
      Miscellaneous attributes for this fulfillment item
    • getInternalAttributes

      public Map<String,Object> getInternalAttributes()
      Miscellaneous internal attributes for this fulfillment item. Distinguished from getAttributes() in that this map is used for attributes that assist in the internal working of Broadleaf Microservices. For example, attributes to help with returning free gift items.
      Returns:
      Miscellaneous internal attributes for this fulfillment item
    • getPricedFulfillmentOption

      @Nullable public com.broadleafcommerce.order.common.domain.PricedFulfillmentOption getPricedFulfillmentOption()
      The PricedFulfillmentOption chosen for this item.
      Returns:
      the PricedFulfillmentOption chosen for this item.
      See Also:
      • PricedFulfillmentOption
    • setId

      public void setId(String id)
      The context ID of this fulfillment item.
      Parameters:
      id - the context ID of the fulfillment item
    • setReferenceNumber

      public void setReferenceNumber(String referenceNumber)
      The reference number for this fulfillment item. This reference number should stay the same even if this item is split, so it could be shared between multiple items.
      Parameters:
      referenceNumber - The reference number for this fulfillment item.
    • setOrderFulfillment

      public void setOrderFulfillment(OrderFulfillment orderFulfillment)
      The owning order fulfillment of this item.
      Parameters:
      orderFulfillment - the order fulfillment that should own this item
    • setOrderItemId

      public void setOrderItemId(String orderItemId)
      The id of the OrderItem to be represented by this fulfillment item.
      Parameters:
      orderItemId - the id of the order item to be represented by this fulfillment item
    • setQuantity

      public void setQuantity(int quantity)
      The quantity of the item to be fulfilled by this fulfillment. This isn't necessarily going to equal OrderItem.getQuantity() since an OrderItem can be split across multiple OrderFulfillments.
      Parameters:
      quantity - the quantity of the item to be fulfilled by this fulfillment
    • setUnitMerchandisePrice

      public void setUnitMerchandisePrice(javax.money.MonetaryAmount unitMerchandisePrice)
      The individual unit price for the merchandise. This is the same as OrderItem.unitPrice.
      Parameters:
      unitPrice - The individual unit price for the merchandise
    • setMerchandiseSubtotal

      public void setMerchandiseSubtotal(javax.money.MonetaryAmount merchandiseSubtotal)
      The unitMerchandisePrice multiplied by quantity.
      Parameters:
      merchandiseSubtotal - the unit merchandise price multiplied by quantity
    • setMerchandiseAdjustmentsTotal

      public void setMerchandiseAdjustmentsTotal(javax.money.MonetaryAmount merchandiseAdjustmentsTotal)
      The total of all the item adjustments for the merchandise. Does not include proratedOrderAdjustments.
      Parameters:
      adjustmentsTotal - The total adjustments for the merchandise
    • setMerchandiseTotal

      public void setMerchandiseTotal(javax.money.MonetaryAmount merchandiseTotal)
      The merchandise total for the item quantity, including merchandiseSubtotal and item merchandiseAdjustmentsTotal. Does not include proratedOrderAdjustments.
      Parameters:
      merchandiseTotal - the merchandise total for the item quantity, including merchandiseSubtotal and item merchandiseAdjustmentsTotal
    • setMerchandiseRefundAmount

      public void setMerchandiseRefundAmount(javax.money.MonetaryAmount merchandiseRefundAmount)
      The merchandise amount to refund when this item is returned, note that prorated order adjustments are included. For example, if this item has a merchandise amount of $10 and has a prorated order adjustment of $2, the merchandise refund amount would be $8.

      This amount is calculated by default when Order is being generated and populated from the corresponding OrderItem.

      Parameters:
      refundAmount - the merchandise amount to refund when this item is returned
      See Also:
    • setFulfillmentRefundAmount

      public void setFulfillmentRefundAmount(javax.money.MonetaryAmount fulfillmentRefundAmount)
      The fulfillment amount to refund when this item is returned, note that prorated fulfillment group adjustments are included. For example, if this item has a fulfillment amount of $5 and has a prorated fulfillment group adjustment of $1, the fulfillment refund amount would be $4.

      This amount is calculated by default when OrderFulfillment is being generated and populated from the corresponding OrderFulfillmentItem.

      Parameters:
      fulfillmentRefundAmount - the fulfillment amount to refund when this item is returned
    • setProratedOrderAdjustments

      public void setProratedOrderAdjustments(javax.money.MonetaryAmount proratedOrderAdjustments)
      The amount prorated to this item from order adjustments.
      Parameters:
      proratedOrderAdjustments - the amount prorated to this item from order adjustments
    • setMerchandiseTaxTotal

      public void setMerchandiseTaxTotal(javax.money.MonetaryAmount merchandiseTaxTotal)
      The total tax of the item merchandise based on the price of the related OrderItem.
      Parameters:
      merchandiseTotalTax - the total tax for the item merchandise based on the price of the related OrderItem
    • setUnitFulfillmentCharge

      public void setUnitFulfillmentCharge(javax.money.MonetaryAmount unitFulfillmentCharge)
      The unit shipping charge of each item before adjustments are applied. This is like OrderItem.getUnitPrice() but for fulfillment.
      Parameters:
      unitFulfillmentCharge - the unit shipping charge of this OrderItem before adjustments are applied
    • setFulfillmentAdjustmentsTotal

      public void setFulfillmentAdjustmentsTotal(javax.money.MonetaryAmount fulfillmentAdjustmentsTotal)
      The total of all the item fulfillment adjustments for this item.
      Parameters:
      fulfillmentAdjustmentsTotal - the total item fulfillment adjustments for this item
    • setProratedOrderFulfillmentAdjustments

      public void setProratedOrderFulfillmentAdjustments(javax.money.MonetaryAmount proratedOrderFulfillmentAdjustments)
      The amount prorated to this item from order fulfillment adjustments.
      Parameters:
      proratedOrderAdjustments - the amount prorated to this item from order fulfillment adjustments
    • setFulfillmentTotal

      public void setFulfillmentTotal(javax.money.MonetaryAmount fulfillmentTotal)
      The total fulfillment price of this item, including adjustments. This does not include taxes.
      Parameters:
      fulfillmentTotal - the total fulfillment price of this item, including adjustments
    • setProratedFulfillmentCharge

      public void setProratedFulfillmentCharge(javax.money.MonetaryAmount proratedFulfillmentCharge)
      The prorated shipping charge for this fulfillment item before adjustments are applied, derived from the FulfillmentGroup.getGroupFulfillmentPriceBeforeAdjustments(). This does not include additional shipping charges specific to the item.
      Parameters:
      proratedFulfillmentCharge - The prorated shipping charge for this item, not including adjustments.
    • setFulfillmentAdjustments

      public void setFulfillmentAdjustments(List<com.broadleafcommerce.order.common.domain.Adjustment> fulfillmentAdjustments)
      Adjustments to item fulfillment pricing that should be applied to the total of unitFulfillmentCharge.
      Parameters:
      fulfillmentAdjustments - adjustments to item fulfillment pricing that should be applied to the total of unitFulfillmentCharge
    • setAvailableOnline

      public void setAvailableOnline(boolean availableOnline)
      Whether or not this product is available online - ie inventory is available somewhere to fulfill this product.
      Parameters:
      availableOnline - Whether or not this product is available online.
    • setInventoryCheckStrategy

      public void setInventoryCheckStrategy(String inventoryCheckStrategy)
      The inventory check strategy of the item. This value helps to determine when an inventory check is required.
      Parameters:
      inventoryCheckStrategy - The inventory check strategy of the item.
    • setInventoryReservationStrategy

      public void setInventoryReservationStrategy(String inventoryReservationStrategy)
      The reservation strategy of the item. This value helps to determine when an inventory reservation is required.
      Parameters:
      inventoryReservationStrategy - The reservation strategy of the item.
    • setTaxDetails

      public void setTaxDetails(List<OrderFulfillmentItemTaxDetail> taxDetails)
      The tax details for this fulfillment item. This is a granular breakdown of tax, describing individual taxes, such as city, state, county, etc. The totals here should equal merchandiseTaxTotal.
      Parameters:
      taxDetails - The tax details for this fulfillment item
    • setIncludedMerchandiseTax

      public void setIncludedMerchandiseTax(javax.money.MonetaryAmount includedMerchandiseTax)
      The amount of merchandise taxes that are included in the item subtotal (VAT).
    • setIncludedFulfillmentTax

      public void setIncludedFulfillmentTax(javax.money.MonetaryAmount includedFulfillmentTax)
      The amount of fulfillment taxes that are included in the item subtotal (VAT).
    • setNonIncludedMerchandiseTax

      public void setNonIncludedMerchandiseTax(javax.money.MonetaryAmount nonIncludedMerchandiseTax)
      The amount of merchandise taxes that are not included in the item subtotal.
    • setNonIncludedFulfillmentTax

      public void setNonIncludedFulfillmentTax(javax.money.MonetaryAmount nonIncludedFulfillmentTax)
      The amount of fulfillment taxes that are not included in the item subtotal.
    • setNonIncludedTaxTotal

      public void setNonIncludedTaxTotal(javax.money.MonetaryAmount nonIncludedTaxTotal)
      The total amount of taxes that are not included in the item subtotal.
    • setItemTotal

      public void setItemTotal(javax.money.MonetaryAmount itemTotal)
      The total amount attributed to this fulfillment item. This is the merchandiseTotal including proratedOrderAdjustments and the nonIncludedTaxTotal.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Miscellaneous attributes for this fulfillment item.
      Parameters:
      attributes - Miscellaneous attributes for this fulfillment item
    • setInternalAttributes

      public void setInternalAttributes(Map<String,Object> internalAttributes)
      Miscellaneous internal attributes for this fulfillment item. Distinguished from getAttributes() in that this map is used for attributes that assist in the internal working of Broadleaf Microservices. For example, attributes to help with returning free gift items.
      Parameters:
      internalAttributes - Miscellaneous internal attributes for this fulfillment item
    • setPricedFulfillmentOption

      public void setPricedFulfillmentOption(@Nullable com.broadleafcommerce.order.common.domain.PricedFulfillmentOption pricedFulfillmentOption)
      The PricedFulfillmentOption chosen for this item.
      Parameters:
      pricedFulfillmentOption - The fulfillment option chosen for this item.
      See Also:
      • PricedFulfillmentOption
    • 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