Interface OrderHistoryService<O extends com.broadleafcommerce.order.client.domain.Order,OF extends OrderWithFulfillmentsAndReturns>
- All Known Implementing Classes:
DefaultOrderHistoryService
public interface OrderHistoryService<O extends com.broadleafcommerce.order.client.domain.Order,OF extends OrderWithFulfillmentsAndReturns>
Service API for
Order history for customers.-
Method Summary
Modifier and TypeMethodDescriptionreadOrderByIdOrNumber(String orderRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve the order with the given order reference (ID or order number) and its fulfillments and returns.readOrderByIdOrNumberForAccount(String orderRef, boolean includeChildren, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve the order with the given order reference (ID or order number) and its fulfillments and returns.org.springframework.data.domain.Page<OF>readOrderHistoryForAccount(boolean includeChildren, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read all orders with its fulfillments and returns for the currently authenticated account with or without including child accounts' ordersorg.springframework.data.domain.Page<OF>readOrderHistoryForCustomer(Integer days, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read all orders with its fulfillments and returns for the currently authenticated customer for the past number of days.
-
Method Details
-
readOrderHistoryForCustomer
org.springframework.data.domain.Page<OF> readOrderHistoryForCustomer(@Nullable Integer days, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read all orders with its fulfillments and returns for the currently authenticated customer for the past number of days.- Parameters:
days- The number of days to read order historypage- the requested page of results from the databasecontextInfo- The current context- Returns:
- The orders with the customer ID in the date range
-
readOrderByIdOrNumber
OF readOrderByIdOrNumber(String orderRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve the order with the given order reference (ID or order number) and its fulfillments and returns.- Parameters:
orderRef- The ID or number of the order to readcontextInfo- The current context- Returns:
- The order with the given ID and its fulfillments and returns.
-
readOrderHistoryForAccount
org.springframework.data.domain.Page<OF> readOrderHistoryForAccount(boolean includeChildren, @Nullable org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read all orders with its fulfillments and returns for the currently authenticated account with or without including child accounts' orders- Parameters:
includeChildren- whether to include child accounts' orderspage- the requested page of results from the databasefilters- custom filters to be appliedcontextInfo- The current context- Returns:
- The orders for the authenticated account and possibly child accounts
-
readOrderByIdOrNumberForAccount
OF readOrderByIdOrNumberForAccount(String orderRef, boolean includeChildren, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve the order with the given order reference (ID or order number) and its fulfillments and returns.- Parameters:
orderRef- The ID or number of the order to readincludeChildren- whether to search in child accounts' orderscontextInfo- The current context- Returns:
- The order with the given ID and its fulfillments and returns.
-