Class OrderUtil

java.lang.Object
com.skava.oms.util.OrderUtil

public final class OrderUtil extends Object
Contains Utility functions for Order Process
Author:
Infosys Equinox
  • Method Details

    • isValidCustomerUpdateRequest

      public static boolean isValidCustomerUpdateRequest(com.skava.core.event.Message<PreProcessPaymentPayload> messagePayload, Order order)
      States the given request is valid to update the customer Id
      Parameters:
      messagePayload -
      order -
      Returns:
    • isCustomerIdAvailable

      public static boolean isCustomerIdAvailable(Order order)
      States the given order has valid customer id.
      Parameters:
      order -
      Returns:
    • isCustomerIdAvailable

      public static boolean isCustomerIdAvailable(OrderPatchDTO order)
      States the given order patch request has valid customer id.
      Parameters:
      order -
      Returns:
    • isOrderIdAvailable

      public static boolean isOrderIdAvailable(OrderPatchDTO order)
      States the given order patch request has valid order id.
      Parameters:
      order -
      Returns:
    • getCustomerId

      public static String getCustomerId(Order order)
      Fetches the customer id in order.
      Parameters:
      order -
      Returns:
    • getCustomerId

      public static String getCustomerId(OrderPatchDTO order)
      Fetches the customer id in order patch request.
      Parameters:
      order -
      Returns:
    • getOrderId

      public static String getOrderId(OrderPatchDTO order)
      Fetches the order id in order patch request.
      Parameters:
      order -
      Returns:
    • getLoyaltyCollectionId

      public static String getLoyaltyCollectionId(Order order)
      This method return payment collection id form order
      Parameters:
      order - - To get collection id
      Returns:
      payment collection id
    • validateOrder

      public static void validateOrder(Order order)
      Validates Order
    • validateOrderStatus

      public static void validateOrderStatus(String[] orderStatus, List<String> statuses)
      Parameters:
      orderStatus -
      statuses -
    • isOrder

      public static boolean isOrder(Order order)
      Checks for Order
      Parameters:
      order -
    • isProcessStarted

      public static boolean isProcessStarted(Order order)
      Checks for process started
      Parameters:
      order -
    • messageSender

      public static void messageSender(Order order, OrderProcessFlowService orderService)
      This method is used to post message in events
      Parameters:
      order - it is contains details to post message in events
      orderService -
    • setOrderSourceToPaymentServiceTransaction

      public static void setOrderSourceToPaymentServiceTransaction(PaymentServiceTransaction paymentServiceTransaction, Order order)
    • isExistingFlowOrNotZeroCheckOutOrder

      public static boolean isExistingFlowOrNotZeroCheckOutOrder(Order order)
      This method is used to check ZeroCheckOutOrder
      Parameters:
      order - contains order data
      Returns:
      boolean value
    • isExistingFlowOrNotZeroCheckOutOrder

      public static boolean isExistingFlowOrNotZeroCheckOutOrder(OrderDTO order)
      This method is used to check ZeroCheckOutOrder
      Parameters:
      order - contains order data
      Returns:
      boolean value
    • isExistingFlowOrZeroCheckOutOrder

      public static boolean isExistingFlowOrZeroCheckOutOrder(OrderDTO order)
      This method is used to check ZeroCheckOutOrder
      Parameters:
      order - contains order data
      Returns:
      boolean value
    • checkOrderTotalValue

      public static boolean checkOrderTotalValue(OrderDTO order)
      This method is used to check checkOrderTotalValue
      Parameters:
      order - contains order data
      Returns:
      boolean value
    • checkOrderTotalValue

      public static boolean checkOrderTotalValue(Order order)
      This method is used to check checkOrderTotalValue
      Parameters:
      order - contains order data
      Returns:
      boolean value
    • calculateOrderTotalValue

      public static BigDecimal calculateOrderTotalValue(OrderDTO order)
      This method is used to check checkOrderTotalValue
      Parameters:
      order - contains order data
      Returns:
      boolean value
    • setOrderNoteUserType

      public static NoteUserType setOrderNoteUserType(Map<String,String> otherProperties, boolean isCSRAdmin)
      This method is used to set the user type values
      Parameters:
      otherProperties - otherProperties of order
      isCSRAdmin - indicate userType is CSR or Customer
      Returns:
      returns the note user type value
    • getTraceId

      public static String getTraceId(OrderMessageTracker<String> orderMessageTracker, Order order)