Package com.skava.oms.util
Class OrderUtil
java.lang.Object
com.skava.oms.util.OrderUtil
Contains Utility functions for Order Process
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimal
calculateOrderTotalValue
(OrderDTO order) This method is used to check checkOrderTotalValuestatic boolean
checkOrderTotalValue
(OrderDTO order) This method is used to check checkOrderTotalValuestatic boolean
checkOrderTotalValue
(Order order) This method is used to check checkOrderTotalValuestatic String
getCustomerId
(OrderPatchDTO order) Fetches the customer id in order patch request.static String
getCustomerId
(Order order) Fetches the customer id in order.static String
getLoyaltyCollectionId
(Order order) This method return payment collection id form orderstatic String
getOrderId
(OrderPatchDTO order) Fetches the order id in order patch request.static String
getTraceId
(OrderMessageTracker<String> orderMessageTracker, Order order) static boolean
States the given order patch request has valid customer id.static boolean
isCustomerIdAvailable
(Order order) States the given order has valid customer id.static boolean
This method is used to check ZeroCheckOutOrderstatic boolean
This method is used to check ZeroCheckOutOrderstatic boolean
This method is used to check ZeroCheckOutOrderstatic boolean
Checks for Orderstatic boolean
isOrderIdAvailable
(OrderPatchDTO order) States the given order patch request has valid order id.static boolean
isProcessStarted
(Order order) Checks for process startedstatic boolean
isValidCustomerUpdateRequest
(com.skava.core.event.Message<PreProcessPaymentPayload> messagePayload, Order order) States the given request is valid to update the customer Idstatic void
messageSender
(Order order, OrderProcessFlowService orderService) This method is used to post message in eventsstatic NoteUserType
setOrderNoteUserType
(Map<String, String> otherProperties, boolean isCSRAdmin) This method is used to set the user type valuesstatic void
setOrderSourceToPaymentServiceTransaction
(PaymentServiceTransaction paymentServiceTransaction, Order order) static void
validateOrder
(Order order) Validates Orderstatic void
validateOrderStatus
(String[] orderStatus, List<String> statuses)
-
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
States the given order has valid customer id.- Parameters:
order
-- Returns:
-
isCustomerIdAvailable
States the given order patch request has valid customer id.- Parameters:
order
-- Returns:
-
isOrderIdAvailable
States the given order patch request has valid order id.- Parameters:
order
-- Returns:
-
getCustomerId
Fetches the customer id in order.- Parameters:
order
-- Returns:
-
getCustomerId
Fetches the customer id in order patch request.- Parameters:
order
-- Returns:
-
getOrderId
Fetches the order id in order patch request.- Parameters:
order
-- Returns:
-
getLoyaltyCollectionId
This method return payment collection id form order- Parameters:
order
- - To get collection id- Returns:
- payment collection id
-
validateOrder
Validates Order -
validateOrderStatus
- Parameters:
orderStatus
-statuses
-
-
isOrder
Checks for Order- Parameters:
order
-
-
isProcessStarted
Checks for process started- Parameters:
order
-
-
messageSender
This method is used to post message in events- Parameters:
order
- it is contains details to post message in eventsorderService
-
-
setOrderSourceToPaymentServiceTransaction
public static void setOrderSourceToPaymentServiceTransaction(PaymentServiceTransaction paymentServiceTransaction, Order order) -
isExistingFlowOrNotZeroCheckOutOrder
This method is used to check ZeroCheckOutOrder- Parameters:
order
- contains order data- Returns:
- boolean value
-
isExistingFlowOrNotZeroCheckOutOrder
This method is used to check ZeroCheckOutOrder- Parameters:
order
- contains order data- Returns:
- boolean value
-
isExistingFlowOrZeroCheckOutOrder
This method is used to check ZeroCheckOutOrder- Parameters:
order
- contains order data- Returns:
- boolean value
-
checkOrderTotalValue
This method is used to check checkOrderTotalValue- Parameters:
order
- contains order data- Returns:
- boolean value
-
checkOrderTotalValue
This method is used to check checkOrderTotalValue- Parameters:
order
- contains order data- Returns:
- boolean value
-
calculateOrderTotalValue
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 orderisCSRAdmin
- indicate userType is CSR or Customer- Returns:
- returns the note user type value
-
getTraceId
-