public interface CartProvider
Cart
. Typically utilizes
WebClient
to make requests to an external REST API.Modifier and Type | Method and Description |
---|---|
com.broadleafcommerce.cart.client.domain.Cart |
createCart(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Create a new cart.
|
com.broadleafcommerce.cart.client.domain.Cart |
createNonRequestCart(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Create a new cart, without updating the original request cart.
|
void |
deleteCartItem(String cartId,
com.broadleafcommerce.cart.client.domain.CartItem cartItem,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.
in favor of updating the entire cart with
updateCart(Cart, ContextInfo) |
com.broadleafcommerce.cart.client.domain.Cart |
patchCart(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Patch the cart.
|
Optional<com.broadleafcommerce.cart.client.domain.Cart> |
retrieveCartById(String cartId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the cart.
|
Optional<com.broadleafcommerce.cart.client.domain.Cart> |
retrieveCartByOrderNumber(String customerId,
String orderNumber,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Find the cart (if it exists) for the provided customer id and order number.
|
Optional<com.broadleafcommerce.cart.client.domain.Cart> |
retrieveCsrOwnedCart(String customerId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the
DefaultCartStatuses.CSR_OWNED cart for the provided customer. |
Optional<com.broadleafcommerce.cart.client.domain.Cart> |
retrieveCustomerCartByStatus(String customerId,
String status,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds a cart with the given status belonging to the provided customer.
|
Optional<com.broadleafcommerce.cart.client.domain.Cart> |
retrieveHistoricalCartForAnonymousCustomer(String emailAddress,
String orderNumber,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Finds a single, historical cart for an anonymous customer.
|
SimplePage<com.broadleafcommerce.cart.client.domain.Cart> |
retrieveHistoricalCartsForCustomer(String customerId,
Date startDate,
Date endDate,
org.springframework.data.domain.Pageable page,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Find all carts not
DefaultCartStatuses.IN_PROCESS ,
DefaultCartStatuses.CSR_OWNED , or DefaultCartStatuses.NAMED for the provided
customer and dates. |
Optional<com.broadleafcommerce.cart.client.domain.Cart> |
retrieveInProcessCart(String customerId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Retrieve the
DefaultCartStatuses.IN_PROCESS cart for the provided customer. |
com.broadleafcommerce.cart.client.domain.Cart |
updateCart(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Update the cart.
|
com.broadleafcommerce.cart.client.domain.CartItem |
updateCartItem(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.cart.client.domain.CartItem cartItem,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Deprecated.
in favor of updating the entire cart with
updateCart(Cart, ContextInfo) |
Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveInProcessCart(String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
DefaultCartStatuses.IN_PROCESS
cart for the provided customer.customerId
- The id of the customer for which we are attempting to find an
DefaultCartStatuses.IN_PROCESS
cart.contextInfo
- Context information around sandbox and multitenant state.DefaultCartStatuses.IN_PROCESS
cart for the provided customer.Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCsrOwnedCart(String customerId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
DefaultCartStatuses.CSR_OWNED
cart for the provided customer.customerId
- The id of the customer for which we are attempting to find an
DefaultCartStatuses.CSR_OWNED
cart.contextInfo
- Context information around sandbox and multitenant state.DefaultCartStatuses.CSR_OWNED
cart for the provided customer.Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCustomerCartByStatus(String customerId, String status, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
customerId
- the customer IDstatus
- the statuscontextInfo
- the context infoOptional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartByOrderNumber(String customerId, String orderNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
customerId
- the id of the customer who owns the cartorderNumber
- the order number for the cartcontextInfo
- Context information around sandbox and multitenant state.SimplePage<com.broadleafcommerce.cart.client.domain.Cart> retrieveHistoricalCartsForCustomer(String customerId, @Nullable Date startDate, @Nullable Date endDate, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
DefaultCartStatuses.IN_PROCESS
,
DefaultCartStatuses.CSR_OWNED
, or DefaultCartStatuses.NAMED
for the provided
customer and dates.customerId
- the id of the customer who owns the cartsstartDate
- the starting date to filter carts byendDate
- the ending date to filter carts bypage
- the requested page of results from the databasecontextInfo
- Context information around sandbox and multitenant state.DefaultCartStatuses.IN_PROCESS
or
DefaultCartStatuses.NAMED
for the provided customer and dates.Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveHistoricalCartForAnonymousCustomer(String emailAddress, String orderNumber, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
emailAddress
- The email address associated with the cart
orderNumber
- The historical cart's order number
contextInfo
- Context information around sandbox and multitenant state.Optional<com.broadleafcommerce.cart.client.domain.Cart> retrieveCartById(String cartId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
cartId
- The id of the cart on which to perform the operation.contextInfo
- Context information around sandbox and multitenant state.com.broadleafcommerce.cart.client.domain.Cart createNonRequestCart(com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
cart
- The cart to createcontextInfo
- Context information around sandbox and multitenant state.com.broadleafcommerce.cart.client.domain.Cart createCart(com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
cart
- The cart to createcontextInfo
- Context information around sandbox and multitenant state.com.broadleafcommerce.cart.client.domain.Cart updateCart(com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
cart
- The cart on which to perform the operation.contextInfo
- Context information around sandbox and multitenant state.com.broadleafcommerce.cart.client.domain.Cart patchCart(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
cart
- The cart on which to perform the operation.contextInfo
- Context information around sandbox and multitenant state.@Deprecated com.broadleafcommerce.cart.client.domain.CartItem updateCartItem(com.broadleafcommerce.cart.client.domain.Cart cart, com.broadleafcommerce.cart.client.domain.CartItem cartItem, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
updateCart(Cart, ContextInfo)
cart
- the cart the item belongs tocartItem
- The cart item on which to perform the operation.contextInfo
- Context information around sandbox and multitenant state.@Deprecated void deleteCartItem(String cartId, com.broadleafcommerce.cart.client.domain.CartItem cartItem, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
updateCart(Cart, ContextInfo)
cartId
- the ID of the card the item belongs tocartItem
- The cart item on which to perform the operation.contextInfo
- Context information around sandbox and multitenant state.Copyright © 2021. All rights reserved.