Class OrderUtils

java.lang.Object
com.skava.oms.orchestration.util.OrderUtils

@Service public final class OrderUtils extends Object

The Class CartUtils.

This class is used for handling common cart related functionality
Author:
Infosys Equinox
  • Method Details

    • updateOrderInfos

      public static void updateOrderInfos(Order order, SFCart sfCart, org.apache.camel.Exchange exchange, boolean csrOrder)
      This method is used to update ordered information based on the store id from the cart response
      Parameters:
      order - Indicates a Order, contains the order information
      sfCart - Indicates a SFCart cart information
      exchange - Indicates a Exchange current store details
    • updateCreateOrderRequestDetails

      public static void updateCreateOrderRequestDetails(org.apache.camel.Exchange exchange, Order orderOms)
      updateCreateOrderRequestDetails
      Parameters:
      exchange - exchange
      orderOms - orderOms
    • isZeroCartOrder

      public static boolean isZeroCartOrder(String enableZeroCheckout, SFCart sfCart)
      This method is used to check if storeProperty enableZeroCheckout is true and cart total is zero
      Parameters:
      enableZeroCheckout - Indicates the Zero checkout property value
      sfCart - Indicates a SFCart, contains the entire cart of the customer
      Returns:
      true or false
    • isZeroPaymentOrder

      public static boolean isZeroPaymentOrder(org.apache.camel.Exchange exchange, BigDecimal price)
      This method is used to check if storeProperty enableZeroCheckout is true and payment is zero
      Parameters:
      exchange - Indicates a Exchange instance, which holds the information during the entire routing of a Message received by a Consumer.
      price - Indicates the price value
      Returns:
      true or false
    • checkZeroCheckoutOrder

      public static boolean checkZeroCheckoutOrder(String enableZeroCheckout, BigDecimal price)

      checkZeroCheckoutOrder

      This method is used to check the eligibility for zero checkout

      Parameters:
      enableZeroCheckout - Indicates the Zero checkout property value
      price - Indicates the price value
      Returns:
      true or false
    • getZeroCheckoutProperty

      public static String getZeroCheckoutProperty(org.apache.camel.Exchange exchange)

      getZeroCheckoutProperty

      This method is used to get ZeroCheckout store Property

      Parameters:
      exchange - Indicates a Exchange instance, which holds the information during the entire routing of a Message received by a Consumer.
      Returns:
      enableZeroCheckout String value
    • setPaymentIdForShipping

      public static List<Math> setPaymentIdForShipping(Math orderShippingItemMath, List<Payment> nonCashPayments)
      This method is to set paymentId for shipping
      Parameters:
      orderShippingItemMath - Indicates the Math value
      nonCashPayments - Indicates a list of Payment information
      Returns:
      List of Math information
    • setPaymentForFullDiscountItem

      public static List<Math> setPaymentForFullDiscountItem(Math itemMath, List<Payment> nonCashPayments, List<Payment> cashPayments)
      This method is used to set the payment for the item with full discounts or totalSale is zero.
      Parameters:
      itemMath - indicates the math of the item
      nonCashPayments - indicates the list of non-cash payments.
      cashPayments - indicated the list of cash payments.
      Returns:
      List of Math information
    • updatePaymentBalanceMap

      public static void updatePaymentBalanceMap(Map<String,BigDecimal> paymentBalanceMap, BigDecimal totalSaleWithTax, Payment cashPayment, PaymentItem paymentItem, BigDecimal value, String isB2B2C)
      This method is to update payment balance map based on payment type.
      Parameters:
      paymentBalanceMap - Indicates the payment balance map information
      totalSaleWithTax - Indicates the total sale value with tax
      cashPayment - Indicates the cash payment information
      paymentItem - Indicates the Payment item information
      value - Indicates the payment value
      isB2B2C - isB2B2C