Class DefaultCartHistoryService
java.lang.Object
com.broadleafcommerce.cartoperation.service.DefaultCartHistoryService
- All Implemented Interfaces:
CartHistoryService
- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCartHistoryService(CartProvider cartProvider, PaymentProvider<PaymentSummary> paymentProvider, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected CartProviderprotected PaymentProvider<PaymentSummary>protected com.broadleafcommerce.common.extension.TypeFactoryretrieveHistoricalCartByOrderNumber(@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:CartHistoryServiceFind the cart and payments (if it exists) for the provided customer id and order number.- Specified by:
retrieveHistoricalCartByOrderNumberin 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:CartHistoryServiceFinds a single, historical cart for an anonymous customer.- Specified by:
retrieveHistoricalCartForAnonymousCustomerin interfaceCartHistoryService- Parameters:
emailAddress- Theemail address associated with the cartorderNumber- Thehistorical cart's order numberhydratePayments- 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()
-