Package com.skava.cart.checkout.process
Class DefaultCheckoutProcess
java.lang.Object
com.skava.cart.checkout.process.DefaultCheckoutValidateProcess
com.skava.cart.checkout.process.DefaultCheckoutProcess
- Direct Known Subclasses:
DefaultCheckoutStrategyServiceImpl
The Class DefaultCheckoutProcess. Provides the default checkout process for
calculate and validate services.
- Since:
- 2019-02-14
- Version:
- 8.2.0
- Author:
- Infosys Equinox
-
Field Summary
FieldsFields inherited from class com.skava.cart.checkout.process.DefaultCheckoutValidateProcess
DATE_OF_AVAILABILITY, IS_PRE_ORDER, messageSource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static BigDecimal
calculateDeliveryCharge
(DeliveryDetails deliveryDetails, CartCheckoutDataRequest request) This method is used to calculate delivery charge details of the cart or cart item.protected static BigDecimal
calculateDiscount
(PromotionDetails promotionDetails, PromotionBreakUpType type, BigDecimal quantity, CartCheckoutDataRequest request) This method is used to calculate promotion for the cartprotected static ItemMathDomain
calculateItem
(CheckoutItem checkoutItemDomain, BigDecimal quantity, boolean isUnitLevel, CartCheckoutDataRequest request) This method is used to calculate price for cart item.protected static BigDecimal
calculateLoyaltyDiscount
(PromotionDetails promotionDetails, List<LoyaltyDetails> loyaltyDetails, BigDecimal quantity, CartCheckoutDataRequest request, String type) This method is used to calculate loyalty promotion for the cartprotected static void
calculatePriceFacetsDiscount
(PromotionDetails promotionDetails, ItemMathDomain itemMath, PromotionBreakUpType type, CartCheckoutDataRequest request, BigDecimal qty) This method is used to calculate priceFacetDiscount for the itemprotected static BigDecimal
calculateRegionalTaxForTotalValue
(CheckoutItem checkoutItemDomain, CartCheckoutDataRequest request) This method is used to calculate regional tax for total valueprotected static BigDecimal
calculateRegionalTaxForUnitValue
(CheckoutItem checkoutItemDomain, CartCheckoutDataRequest request) This method is used to calculate regionl tax for unit valueprotected static BigDecimal
calculateTaxForTotalValue
(CheckoutItem checkoutItemDomain, CartCheckoutDataRequest request) This method is used to calculate tax for total Value for the cart item.protected static BigDecimal
calculateTaxForUnitValue
(CheckoutItem checkoutItemDomain, CartCheckoutDataRequest request) This method is used to calculate tax for the Unit value for the cart item.protected BigDecimal
calculateTotalItemDeliveryCharge
(BigDecimal totalDeliveryCharge, BigDecimal totalQuantity, BigDecimal totalItemDeliveryCharge, CheckoutItem checkoutItemDomain, boolean isLastItem) This method is used to calculate totalDeliveryCharge.protected static boolean
checkIfAllItemsWithFullDiscount
(CartCheckoutDomain cartCheckoutDomain) This method is used to check if the cart contains only item with full discount.static int
countGiftItems
(CartCheckoutDomain cartCheckoutDomainProration) This method is used to count gift Items.static PromotionDetails
createDiscountDTO
(Map<String, PromotionDetails> promoDetails, List<String> loyaltyTypeList, BigDecimal quantity, Map<String, BigDecimal> discountRatio, Map<String, Boolean> skipProrationList, Map<String, Boolean> isLastItemList, Map<String, Map<String, BigDecimal>> ratioList) static List<LoyaltyDetails>
createItemLoyaltyDetailsDTO
(List<LoyaltyDetails> loyaltyDetails, Map<String, BigDecimal> discountRatio, Boolean skipLoyaltyProration, CheckoutItem checkoutItemDomain, Map<String, Boolean> isLastItemList) static TaxationDetails
createTaxationDTO
(Map<String, TaxationDetails> taxationDetails, BigDecimal quantity, Map<String, BigDecimal> taxationRatio, Map<String, Boolean> isLastItemList, Map<String, BigDecimal> otherTaxCharges) void
doItemLevelProration
(CartCheckoutDomain cartCheckoutDomain, CartCheckoutDataRequest request, int itemsToReturn, BigDecimal salesItemPriceSum, int skipSubscriptionItemsCount) This method is used to update proration for delivery details of the orchestration cart response Cartlevel Delivery Charges / Discountvoid
doItemLevelProration
(CartCheckoutDomain cartCheckoutDomain, CartCheckoutDataRequest request, int itemsToReturn, BigDecimal salesItemPriceSum, int skipSubscriptionItemsCount, Map<String, Object> requestMap) This method is used to update proration for delivery details of the orchestration cart response Cartlevel Delivery Charges / Discountprotected static boolean
doProration
(BigDecimal quantity, BigDecimal ratio, PromotionBreakUp breakup, PromotionBreakUp promotionBreakup, boolean isLastItem) This method is used to do prorate calculation based on the ration and quantity of the item for promotion.static BigDecimal
getTotalCartDeliveryTax
(CartCheckoutDomain cartCheckoutDomain) static BigDecimal
getTotalCartRegionalTax
(CartCheckoutDomain cartCheckoutDomain) This method is used to get total regional tax in cartstatic BigDecimal
getTotalItemsDeliveredWithCart
(CartCheckoutDomain cartCheckoutDomain, boolean isCartWithFullDiscountItems) protected static void
initializeSummazations
(PromotionBreakUp breakup) Initialize summazations.protected static boolean
isLastItemForDeliveryProration
(CartCheckoutDomain cartCheckoutDomain, CheckoutItem checkoutItemDomain, boolean isFullDiscountItem, boolean isCartWithFullDiscountItems, boolean isLastItem) This method is used to check if the item last item to prorate delivery charge.static boolean
isLastItemForDiscountProartionItem
(CartCheckoutDomain cartCheckoutDomain, CheckoutItem checkoutItemDomain, boolean skipProration) This method is used to check if the item is last item eligible for cart discount prorationstatic boolean
isLastItemForLoyaltyDiscountProartionItem
(CartCheckoutDomain cartCheckoutDomain, CheckoutItem checkoutItemDomain, boolean skipLoyaltyProration) This method is used to check if the item is last item eligible for cart discount prorationprotected static BigDecimal
prorateCartDeliveryTax
(BigDecimal proratedItemLevelTax, BigDecimal totalCartDeliveryTax, BigDecimal totalItemsDeliveredWithCart, CheckoutItem checkoutItemDomain, boolean isLastItem) This method is used to calculate prorateCartDeliveryTax.protected static BigDecimal
prorateCartRegionalTax
(BigDecimal proratedItemLevelRegionalTax, BigDecimal totalCartRegionalTax, BigDecimal totalItemsDeliveredWithCart, CheckoutItem checkoutItemDomain, boolean isLastItem) This method is used to prorate cart regional taxstatic void
prorateOtherTaxCharges
(BigDecimal quantity, Map<String, Boolean> isLastItemList, Map<String, BigDecimal> otherTaxCharges, TaxationDetails itemTaxationDetail, Map<String, TaxationDetails> taxationDetails) protected Map<String,
BigDecimal> setDeliveryCharge
(DeliveryDetails deliveryDetails, Map<String, BigDecimal> deliveryMap, BigDecimal deliveryCharge) This method used to group the delivery charge based on the typestatic void
setPaymentValue
(CartCheckoutDomain cartCheckoutDomain, CartCheckoutDataRequest request) This method is used to update cart payment value.protected static PromotionDetails
setPromotionsForPromotionItem
(PromotionBreakUp breakupDomain, PromotionDetails itemPromotionDetails, PromotionBreakUpType breakUpType) static TaxationDetails
setSkuTaxationDetails
(Map<String, TaxationDetails> taxationDetails, BigDecimal quantity, String key, BigDecimal value, Map<String, Boolean> isLastItemList, TaxationDetails itemTaxationDetail) static BigDecimal
updateLastUnitAndTotalTaxPriceValue
(BigDecimal lastTaxPrice, BigDecimal taxPrice) This method is used to update tax pricevalue.static boolean
validateBundle
(CheckoutItem checkoutItemDomain, SkuType type) This method is used to validate sku type.protected static boolean
validateFullDiscountItem
(boolean isCartWithFullDiscountItems, boolean isGift, CheckoutItem item) This method is used to check if the item contains full discount.static boolean
validateGiftItem
(CheckoutItem checkoutItemDomain) This method is used to check if the product id Gift product or not.Methods inherited from class com.skava.cart.checkout.process.DefaultCheckoutValidateProcess
isDeliveryMethodSelected, isDeliveryMethodSelected, isMethodSelectedItemLevel, validateCommunicationPreference, validateItemQuantity, validatePreOrderAvailabilityDate, validateShipping
-
Field Details
-
DELIVERY_MAP
- See Also:
-
-
Constructor Details
-
DefaultCheckoutProcess
public DefaultCheckoutProcess()
-
-
Method Details
-
setPaymentValue
public static void setPaymentValue(CartCheckoutDomain cartCheckoutDomain, CartCheckoutDataRequest request) This method is used to update cart payment value.- Parameters:
cartCheckoutDomain
- Indicates aCartCheckoutDomain
,contains the entire cart of the customer.request
- aCartCheckoutDataRequest
object.
-
getTotalItemsDeliveredWithCart
public static BigDecimal getTotalItemsDeliveredWithCart(CartCheckoutDomain cartCheckoutDomain, boolean isCartWithFullDiscountItems) -
getTotalCartDeliveryTax
-
getTotalCartRegionalTax
This method is used to get total regional tax in cart- Parameters:
cartCheckoutDomain
- cartCheckoutDomain- Returns:
- totalCartRegionalTax
-
doItemLevelProration
public void doItemLevelProration(CartCheckoutDomain cartCheckoutDomain, CartCheckoutDataRequest request, int itemsToReturn, BigDecimal salesItemPriceSum, int skipSubscriptionItemsCount) This method is used to update proration for delivery details of the orchestration cart response Cartlevel Delivery Charges / Discount- Parameters:
cartCheckoutDomain
- Indicates aCartCheckoutDomain
, contains the entire cart of the customer.request
- aCartCheckoutDataRequest
object.itemsToReturn
- holds number of items to returnsalesItemPriceSum
- holds sum of sales items.skipSubscriptionItemsCount
- number of subscription items to skip.
-
doItemLevelProration
public void doItemLevelProration(CartCheckoutDomain cartCheckoutDomain, CartCheckoutDataRequest request, int itemsToReturn, BigDecimal salesItemPriceSum, int skipSubscriptionItemsCount, Map<String, Object> requestMap) This method is used to update proration for delivery details of the orchestration cart response Cartlevel Delivery Charges / Discount- Parameters:
cartCheckoutDomain
- Indicates aCartCheckoutDomain
, contains the entire cart of the customer.request
- aCartCheckoutDataRequest
object.itemsToReturn
- holds number of items to returnsalesItemPriceSum
- holds sum of sales items.skipSubscriptionItemsCount
- number of subscription items to skip.requestMap
- holds the cartMath info
-
setDeliveryCharge
protected Map<String,BigDecimal> setDeliveryCharge(DeliveryDetails deliveryDetails, Map<String, BigDecimal> deliveryMap, BigDecimal deliveryCharge) This method used to group the delivery charge based on the type- Parameters:
deliveryDetails
-deliveryMap
-deliveryCharge
-- Returns:
-
calculateTotalItemDeliveryCharge
protected BigDecimal calculateTotalItemDeliveryCharge(BigDecimal totalDeliveryCharge, BigDecimal totalQuantity, BigDecimal totalItemDeliveryCharge, CheckoutItem checkoutItemDomain, boolean isLastItem) This method is used to calculate totalDeliveryCharge.- Parameters:
totalDeliveryCharge
- value of totalDeliveryCharge.totalQuantity
- to get totalDeliveryCharge.totalItemDeliveryCharge
- value to be calculated.checkoutItemDomain
- domain object of checkoutItem.isLastItem
- boolean parameter indicates whether the item is last.- Returns:
- totalItemDeliveryCharge
-
prorateCartDeliveryTax
protected static BigDecimal prorateCartDeliveryTax(BigDecimal proratedItemLevelTax, BigDecimal totalCartDeliveryTax, BigDecimal totalItemsDeliveredWithCart, CheckoutItem checkoutItemDomain, boolean isLastItem) This method is used to calculate prorateCartDeliveryTax.- Parameters:
proratedItemLevelTax
- proratedItemLevelTax to added with totalCartDeliveryTax.totalCartDeliveryTax
- value of totalCartDeliveryTax.totalItemsDeliveredWithCart
- value of totalItemsDeliveredWithCart.checkoutItemDomain
- domain object of checkoutItem.isLastItem
- boolean paremeter indicates whether the item is last.- Returns:
- proratedItemLevelTax
-
prorateCartRegionalTax
protected static BigDecimal prorateCartRegionalTax(BigDecimal proratedItemLevelRegionalTax, BigDecimal totalCartRegionalTax, BigDecimal totalItemsDeliveredWithCart, CheckoutItem checkoutItemDomain, boolean isLastItem) This method is used to prorate cart regional tax- Parameters:
proratedItemLevelRegionalTax
- proratedItemLevelRegionalTaxtotalCartRegionalTax
- totalCartRegionalTaxtotalItemsDeliveredWithCart
- totalItemsDeliveredWithCartcheckoutItemDomain
- checkoutItemDomainisLastItem
- isLastItem- Returns:
- prorated regional tax
-
calculateItem
protected static ItemMathDomain calculateItem(CheckoutItem checkoutItemDomain, BigDecimal quantity, boolean isUnitLevel, CartCheckoutDataRequest request) This method is used to calculate price for cart item.- Parameters:
checkoutItemDomain
- Indicates aCheckoutItem
.quantity
- Indicates the quantity of the cart itemsisUnitLevel
- Indicates the flag to denote unit or total level.request
- aCartCheckoutDataRequest
object.- Returns:
- Returns
ItemMathDomain
, contains calculated result for the item.
-
calculatePriceFacetsDiscount
protected static void calculatePriceFacetsDiscount(PromotionDetails promotionDetails, ItemMathDomain itemMath, PromotionBreakUpType type, CartCheckoutDataRequest request, BigDecimal qty) This method is used to calculate priceFacetDiscount for the item- Parameters:
promotionDetails
- Indicates aPromotionDetails
, contains all promotion details of the item or the cart.itemMath
- Indicates aItemMathDomain
.type
- Indicates aPromotionBreakUpType
.request
- aCartCheckoutDataRequest
object.qty
- quantity to set unitlevel or totallevel priceFacet values.
-
calculateDiscount
protected static BigDecimal calculateDiscount(PromotionDetails promotionDetails, PromotionBreakUpType type, BigDecimal quantity, CartCheckoutDataRequest request) This method is used to calculate promotion for the cart- Parameters:
promotionDetails
- Indicates aPromotionDetails
, contains all promotion details of the item or the cart.type
- Indicates aPromotionBreakUpType
, contains the promotion break up type.quantity
- Indicates the quantity of the cart.request
- aCartCheckoutDataRequest
object.- Returns:
- Returns the discount value.
-
calculateLoyaltyDiscount
protected static BigDecimal calculateLoyaltyDiscount(PromotionDetails promotionDetails, List<LoyaltyDetails> loyaltyDetails, BigDecimal quantity, CartCheckoutDataRequest request, String type) This method is used to calculate loyalty promotion for the cart- Parameters:
promotionDetails
- Indicates aPromotionDetails
, contains all promotion details of the item or the cart.loyaltyDetails
- aLoyaltyDetails
, contains the loyalty details.quantity
- Indicates the quantity of the cart.request
- aCartCheckoutDataRequest
object.type
- contains the type like LOYALTY / VOUCHER.- Returns:
- Returns the discount value.
-
calculateTaxForUnitValue
protected static BigDecimal calculateTaxForUnitValue(CheckoutItem checkoutItemDomain, CartCheckoutDataRequest request) This method is used to calculate tax for the Unit value for the cart item.- Parameters:
checkoutItemDomain
- Indicates aCheckoutItem
, contains the item details that can be placed in a cart.request
- aCartCheckoutDataRequest
object.- Returns:
- Returns the calculated tax unit price value.
-
calculateRegionalTaxForUnitValue
protected static BigDecimal calculateRegionalTaxForUnitValue(CheckoutItem checkoutItemDomain, CartCheckoutDataRequest request) This method is used to calculate regionl tax for unit value- Parameters:
checkoutItemDomain
- checkoutItemDomainrequest
- request- Returns:
- regional tax for unit value
-
calculateTaxForTotalValue
protected static BigDecimal calculateTaxForTotalValue(CheckoutItem checkoutItemDomain, CartCheckoutDataRequest request) This method is used to calculate tax for total Value for the cart item.- Parameters:
checkoutItemDomain
- Indicates aCheckoutItem
, contains the item details that can be placed in a cart.request
- aCartCheckoutDataRequest
object.- Returns:
- Returns the calculated tax value for total item price.
-
calculateRegionalTaxForTotalValue
protected static BigDecimal calculateRegionalTaxForTotalValue(CheckoutItem checkoutItemDomain, CartCheckoutDataRequest request) This method is used to calculate regional tax for total value- Parameters:
checkoutItemDomain
- checkoutItemDomainrequest
- request- Returns:
- regional tax for total value
-
calculateDeliveryCharge
protected static BigDecimal calculateDeliveryCharge(DeliveryDetails deliveryDetails, CartCheckoutDataRequest request) This method is used to calculate delivery charge details of the cart or cart item.- Parameters:
deliveryDetails
- Indicates aDeliveryDetails
, contains delivery details of the item or the items in the cart.request
- aCartCheckoutDataRequest
object.- Returns:
- Returns the calculated delivery charge of the cart or cart item.
-
doProration
protected static boolean doProration(BigDecimal quantity, BigDecimal ratio, PromotionBreakUp breakup, PromotionBreakUp promotionBreakup, boolean isLastItem) This method is used to do prorate calculation based on the ration and quantity of the item for promotion. This will return true once prorated calculation has been done else false.- Parameters:
quantity
- Indicates the quantity of discount item.ratio
- Indicates the ratio which used to calculate the unit and total discount.breakup
- Indicates aPromotionBreakUp
, contains the different promotions that are applied to an item or the cart.promotionBreakup
- Indicates aPromotionBreakUp
, contains the different promotions that are applied to an item or the cart.isLastItem
- flag to validate is last item.- Returns:
- returns true, if Prorated.
-
createItemLoyaltyDetailsDTO
public static List<LoyaltyDetails> createItemLoyaltyDetailsDTO(List<LoyaltyDetails> loyaltyDetails, Map<String, BigDecimal> discountRatio, Boolean skipLoyaltyProration, CheckoutItem checkoutItemDomain, Map<String, Boolean> isLastItemList) - Parameters:
loyaltyDetails
- Indicates aLoyaltyDetails
, contains all loyalty details of the item or the cart.discountRatio
- Indicates the ratio which used to calculate the unit and total discount.skipLoyaltyProration
- holds the boolean value.checkoutItemDomain
- Indicates aCheckoutItem
, contains all loyalty details of the item or the cart.isLastItemList
- holds the flag to validate is last item.- Returns:
- LoyaltyDetails
-
createDiscountDTO
public static PromotionDetails createDiscountDTO(Map<String, PromotionDetails> promoDetails, List<String> loyaltyTypeList, BigDecimal quantity, Map<String, BigDecimal> discountRatio, Map<String, Boolean> skipProrationList, Map<String, Boolean> isLastItemList, Map<String, Map<String, BigDecimal>> ratioList) - Parameters:
promoDetails
- Indicates aPromotionDetails
, contains all promotion details of the item or the cart.loyaltyTypeList
- contains the type of loyaltydetails.quantity
- Indicates the quantity of discount item.discountRatio
- Indicates the ratio which used to calculate the unit and total discount.skipProrationList
- indicates proration eligibility of item contains all promotion details of the item or the cart.isLastItemList
- holds the flag to validate is last item.ratioList
- contains price facets ratio list- Returns:
- PromotionDetails
-
createTaxationDTO
public static TaxationDetails createTaxationDTO(Map<String, TaxationDetails> taxationDetails, BigDecimal quantity, Map<String, BigDecimal> taxationRatio, Map<String, Boolean> isLastItemList, Map<String, BigDecimal> otherTaxCharges) - Parameters:
taxationDetails
- holds taxationDetails details of the cart.quantity
- Indicates the quantity of discount item.taxationRatio
- Indicates the ratio which used to calculate the unit and total discount.isLastItemList
- holds the flag to validate is last item.otherTaxCharges
- holds otherTaxCharges of cart.- Returns:
- TaxationDetails
-
prorateOtherTaxCharges
public static void prorateOtherTaxCharges(BigDecimal quantity, Map<String, Boolean> isLastItemList, Map<String, BigDecimal> otherTaxCharges, TaxationDetails itemTaxationDetail, Map<String, TaxationDetails> taxationDetails) - Parameters:
quantity
- Indicates the quantity of discount item.isLastItemList
- holds the flag to validate is last item.otherTaxCharges
- holds otherTaxCharges of cart.taxationDetails
- holds taxationDetails details of the cart.itemTaxationDetail
- holds taxationDetails details of the item.
-
setSkuTaxationDetails
public static TaxationDetails setSkuTaxationDetails(Map<String, TaxationDetails> taxationDetails, BigDecimal quantity, String key, BigDecimal value, Map<String, Boolean> isLastItemList, TaxationDetails itemTaxationDetail) - Parameters:
taxationDetails
- holds taxationDetails details of the cart.quantity
- holds the quantity of discount item.key
- holds holds String value of the tax price discount.value
- holds BigDecimal ratio value which used to calculate the unit and total discountisLastItemList
- holds the flag to validate is last item.itemTaxationDetail
- holds taxationDetails details of the item.- Returns:
- TaxationDetails
-
updateLastUnitAndTotalTaxPriceValue
public static BigDecimal updateLastUnitAndTotalTaxPriceValue(BigDecimal lastTaxPrice, BigDecimal taxPrice) This method is used to update tax pricevalue.- Parameters:
lastTaxPrice
- Holds lastTaxPrice value.taxPrice
- Holds taxPrice value.- Returns:
- BigDecimal value.
-
initializeSummazations
Initialize summazations.- Parameters:
breakup
- indicates aPromotionBreakUp
-
setPromotionsForPromotionItem
protected static PromotionDetails setPromotionsForPromotionItem(PromotionBreakUp breakupDomain, PromotionDetails itemPromotionDetails, PromotionBreakUpType breakUpType) - Parameters:
breakupDomain
- Indicates aPromotionBreakUpDomain
, contains the different promotions that are applied to an item or the cart.itemPromotionDetails
- Indicates aPromotionBreakUpDomain
, contains the different promotions that are applied to an item or the cart item.breakUpType
- indicates type of the promotion break up.- Returns:
- promotion details
-
validateBundle
This method is used to validate sku type.- Parameters:
checkoutItemDomain
- Indicates aCheckoutPromotion
, contains promotion details.type
- Indicates aSkuType
, applied to an item or the cart.- Returns:
- boolean .
-
validateGiftItem
This method is used to check if the product id Gift product or not.- Parameters:
checkoutItemDomain
- aCheckoutItem
, contains item details- Returns:
- boolean .
-
countGiftItems
This method is used to count gift Items.- Parameters:
cartCheckoutDomainProration
- aCartCheckoutDomain
, contains item details- Returns:
- giftItems .
-
isLastItemForDiscountProartionItem
public static boolean isLastItemForDiscountProartionItem(CartCheckoutDomain cartCheckoutDomain, CheckoutItem checkoutItemDomain, boolean skipProration) This method is used to check if the item is last item eligible for cart discount proration- Parameters:
cartCheckoutDomain
- aCartCheckoutDomain
contains cartCheckout objectcheckoutItemDomain
- aCheckoutItem
, contains item detailsskipProration
- indicates proration eligibility of item- Returns:
- boolean indicates the if item is last item for discount proration
-
isLastItemForLoyaltyDiscountProartionItem
public static boolean isLastItemForLoyaltyDiscountProartionItem(CartCheckoutDomain cartCheckoutDomain, CheckoutItem checkoutItemDomain, boolean skipLoyaltyProration) This method is used to check if the item is last item eligible for cart discount proration- Parameters:
cartCheckoutDomain
- aCartCheckoutDomain
contains cartCheckout objectcheckoutItemDomain
- aCheckoutItem
, contains item detailsskipLoyaltyProration
- indicates proration eligibility of loyalty item- Returns:
- boolean indicates the if item is last item for discount proration
-
isLastItemForDeliveryProration
protected static boolean isLastItemForDeliveryProration(CartCheckoutDomain cartCheckoutDomain, CheckoutItem checkoutItemDomain, boolean isFullDiscountItem, boolean isCartWithFullDiscountItems, boolean isLastItem) This method is used to check if the item last item to prorate delivery charge.- Parameters:
cartCheckoutDomain
- aCartCheckoutDomain
contains cartCheckout object.checkoutItemDomain
- aCheckoutItem
, contains item details.isFullDiscountItem
- indicates if the item is having full discount.isCartWithFullDiscountItems
- indicates if the cart contains only item with full discount.isLastItem
- indicates if the item is last for proration.- Returns:
- isLastItemForDeliveryProration
-
validateFullDiscountItem
protected static boolean validateFullDiscountItem(boolean isCartWithFullDiscountItems, boolean isGift, CheckoutItem item) This method is used to check if the item contains full discount.- Parameters:
isCartWithFullDiscountItems
- indicates if the cart contains only item with full discount.isGift
- indicates if the item is gift.item
- aCheckoutItem
, contains item details.- Returns:
- validateFullDiscountItem
-
checkIfAllItemsWithFullDiscount
This method is used to check if the cart contains only item with full discount.- Parameters:
cartCheckoutDomain
- aCartCheckoutDomain
contains cartCheckout object.- Returns:
- checkIfAllItemsWithFullDiscount
-