Interface PricingProvider
- All Known Implementing Classes:
ExternalPricingProvider
public interface PricingProvider
Provider for interfacing with operations around pricing. Typically utilizes
WebClient
to
make requests to an external REST API.- Author:
- Chad Harchar (charchar)
-
Method Summary
Modifier and TypeMethodDescriptioncom.broadleafcommerce.pricing.client.domain.usage.RecordPriceDataUsageResponse
recordPriceDataUsages
(com.broadleafcommerce.pricing.client.domain.usage.RecordPriceDataUsageRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Records the usages for prices that are limited by quantity.<C extends com.broadleafcommerce.cart.client.domain.CartItem>
List<com.broadleafcommerce.pricing.client.domain.PriceInfo>retrievePriceInfos
(Collection<C> cartItems, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the prices for the provided cart items without attaching them.default List<com.broadleafcommerce.cart.client.domain.CartItem>
retrievePrices
(com.broadleafcommerce.cart.client.domain.Cart cart, Locale locale, javax.money.CurrencyUnit currency, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve and attach prices for the provided cart items.default <C extends com.broadleafcommerce.cart.client.domain.CartItem>
List<C>retrievePrices
(Collection<C> cartItems, Locale locale, javax.money.CurrencyUnit currency, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
retrievePrices
@Deprecated(forRemoval=true) default <C extends com.broadleafcommerce.cart.client.domain.CartItem> List<C> retrievePrices(Collection<C> cartItems, Locale locale, javax.money.CurrencyUnit currency, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Deprecated, for removal: This API element is subject to removal in a future version.Retrieve and attach prices for the provided cart items.- Parameters:
cartItems
- The cart items that we are pricing.locale
- The locale to use to match prices.currency
- The currency to use to match prices.contextInfo
- Context information around sandbox and multitenant state.- Returns:
- The cart items with prices attached.
-
retrievePrices
default List<com.broadleafcommerce.cart.client.domain.CartItem> retrievePrices(com.broadleafcommerce.cart.client.domain.Cart cart, Locale locale, javax.money.CurrencyUnit currency, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieve and attach prices for the provided cart items.- Parameters:
cart
- The cart that we are pricing.locale
- The locale to use to match prices.currency
- The currency to use to match prices.contextInfo
- Context information around sandbox and multitenant state.- Returns:
- The cart items with prices attached.
-
retrievePriceInfos
<C extends com.broadleafcommerce.cart.client.domain.CartItem> List<com.broadleafcommerce.pricing.client.domain.PriceInfo> retrievePriceInfos(Collection<C> cartItems, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves the prices for the provided cart items without attaching them.- Parameters:
cartItems
- The cart items that we are pricing.priceContext
- ThePriceContext
contextInfo
- Context information around sandbox and multitenant state.- Returns:
- The prices for the provided cart items
-
recordPriceDataUsages
com.broadleafcommerce.pricing.client.domain.usage.RecordPriceDataUsageResponse recordPriceDataUsages(com.broadleafcommerce.pricing.client.domain.usage.RecordPriceDataUsageRequest request, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Records the usages for prices that are limited by quantity.- Parameters:
request
- theRecordPriceDataUsageRequest
contextInfo
- Context information around sandbox and multitenant state.- Returns:
- the
RecordPriceDataUsageResponse
representing the result of the request
-
retrievePrices(Cart, Locale, CurrencyUnit, ContextInfo)