Class CartItemUtil
java.lang.Object
com.skava.cart.orchestration.transformation.CartOrderPromotionTransformation
com.skava.cart.orchestration.utils.CartItemUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Boolean
checkItemForNonCashPayment
(SFItem sfItem) This method is used to check if a product is eligible for Non Cash payment or notgetNegatedDiscountValues
(String keyFacet, Map<String, Object> value) static BigDecimal
getTotalPriceForEligibleItems
(SFCart sfCart) This method is used to get sum of price of all eligible items for redemptionstatic Boolean
isLastItemForNonCashPayment
(SFCart sfCart, SFItem sfItem) This method is used to check if the item is last item in the list for loyalty paymentstatic void
setItemOtherCharges
(SFItem sfItem, OrderItem orderItem) This method is used to set item other chargesstatic void
setItemPriceFacets
(SFItem sfItem, SFCart sfCart, OrderItem orderItem) This method is used to set item price facetsstatic void
setLoyaltyDetails
(SFItem sfItem, OrderItem orderItem) This method is used to set loyalty detailsstatic OrderItem
updateOrderItem
(SFItem sfItem, SFCart sfCart, List<Payment> nonCashPayments, List<Payment> cashPayments, Map<String, BigDecimal> paymentBalanceMap, String productPropertyToEarnRewards, Map<String, String> commonVar) This method is used to update an order item.static void
updateOrderItemMathTaxDetails
(SFItem sfItem, Math orderItemMath) Used to update the tax details in the order itemMethods inherited from class com.skava.cart.orchestration.transformation.CartOrderPromotionTransformation
constructDiscountDTO
-
Field Details
-
TRUE
- See Also:
-
FALSE
- See Also:
-
ELIGIBLE_FOR_REWARDS
- See Also:
-
EARN_VOUCHER
- See Also:
-
REDEEM_VOUCHER
- See Also:
-
-
Method Details
-
updateOrderItem
public static OrderItem updateOrderItem(SFItem sfItem, SFCart sfCart, List<Payment> nonCashPayments, List<Payment> cashPayments, Map<String, BigDecimal> paymentBalanceMap, String productPropertyToEarnRewards, Map<String, String> commonVar) This method is used to update an order item.- Parameters:
sfItem
- Indicates aSFItem
, contains the item details that can be placed in a cartsfCart
- Indicates aSFCart
, contains the entire cart of the customernonCashPayments
- Indicates the identifier of the payment in order to calculate the order shipping itemcashPayments
- Indicates the identifier of the payment in order to calculate the order shipping itemcommonVar
- Contains binName and enableZeroCheckoutpaymentBalanceMap
- Indicates a paymentBalanceMapproductPropertyToEarnRewards
- Indicates the product property for earn Loyalty.- Returns:
- Returns a
OrderItem
, contains the order item details
-
setItemOtherCharges
This method is used to set item other charges- Parameters:
sfItem
- sfItemorderItem
- orderItem
-
setItemPriceFacets
This method is used to set item price facets- Parameters:
sfItem
- sfItemsfCart
- sfCartorderItem
- orderItem
-
setLoyaltyDetails
This method is used to set loyalty details- Parameters:
sfItem
- sfItemorderItem
- orderItem
-
updateOrderItemMathTaxDetails
Used to update the tax details in the order item- Parameters:
sfCart
- contains the item details that can be placed in a cartorderItemMath
- refers to the order item
-
getNegatedDiscountValues
public static Map<String,Object> getNegatedDiscountValues(String keyFacet, Map<String, Object> value) - Parameters:
keyFacet
- Indicates a string value for keyFacetvalue
- Indicates the map of the discount values for the items- Returns:
- Returns the corresponding map of negated discount values for the items
-
isLastItemForNonCashPayment
This method is used to check if the item is last item in the list for loyalty payment -
checkItemForNonCashPayment
This method is used to check if a product is eligible for Non Cash payment or not- Parameters:
sfItem
- refers to Cart product- Returns:
- toRet
-
getTotalPriceForEligibleItems
This method is used to get sum of price of all eligible items for redemption- Parameters:
sfCart
- Indicates aSFCart
, contains the entire cart of the customer- Returns:
- the corresponding BigDecimal value
-