Class DefaultCartHistoryService
java.lang.Object
com.broadleafcommerce.cartoperation.service.DefaultCartHistoryService
- All Implemented Interfaces:
CartHistoryService
- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorDescriptionDefaultCartHistoryService
(CartProvider cartProvider, PaymentProvider<PaymentSummary> paymentProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected CartProvider
protected PaymentProvider<PaymentSummary>
protected com.broadleafcommerce.common.extension.TypeFactory
retrieveHistoricalCartByOrderNumber
(@NonNull String customerId, @NonNull String orderNumber, boolean hydratePayments, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find the cart and payments (if it exists) for the provided customer id and order number.retrieveHistoricalCartForAnonymousCustomer
(@NonNull String emailAddress, @NonNull String orderNumber, boolean hydratePayments, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds a single, historical cart for an anonymous customer.
-
Constructor Details
-
DefaultCartHistoryService
public DefaultCartHistoryService(CartProvider cartProvider, PaymentProvider<PaymentSummary> paymentProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
retrieveHistoricalCartByOrderNumber
public CartHistoryResponse retrieveHistoricalCartByOrderNumber(@NonNull @NonNull String customerId, @NonNull @NonNull String orderNumber, boolean hydratePayments, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CartHistoryService
Find the cart and payments (if it exists) for the provided customer id and order number.- Specified by:
retrieveHistoricalCartByOrderNumber
in interfaceCartHistoryService
- Parameters:
customerId
- the id of the customer who owns the cartorderNumber
- the order number for the carthydratePayments
- if true, the payments for the cart will be added to the responsecontextInfo
- Context information around sandbox and multitenant state.- Returns:
- a cart and payments (if it exists) with the given order number that belongs to the provided customer
-
retrieveHistoricalCartForAnonymousCustomer
public CartHistoryResponse retrieveHistoricalCartForAnonymousCustomer(@NonNull @NonNull String emailAddress, @NonNull @NonNull String orderNumber, boolean hydratePayments, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CartHistoryService
Finds a single, historical cart for an anonymous customer.- Specified by:
retrieveHistoricalCartForAnonymousCustomer
in interfaceCartHistoryService
- Parameters:
emailAddress
- Theemail address associated with the cart
orderNumber
- Thehistorical cart's order number
hydratePayments
- if true, the payments for the cart will be added to the responsecontextInfo
- Context information around sandbox and multitenant state.- Returns:
- The single, historical cart for an anonymous customer
-
getCartProvider
-
getPaymentProvider
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-