Interface PricingProvider
-
- All Known Implementing Classes:
ExternalPricingProvider
public interface PricingProviderProvider for interfacing with operations around pricing. Typically utilizesWebClientto make requests to an external REST API.Note that priceable entities such as
Productshould implement the interfacePriceableto aid in mapping thePriceInfosback onto them.- Author:
- Nathan Moore (nathandmoore)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProductpriceProduct(Product product, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Populates pricing info for the providedProductand its related priceable entities:Variant,IncludedProduct,SpecificItemChoice.<P extends Product>
List<P>priceProducts(Collection<P> products, com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Populates pricing info for the providedProductsand their related priceable entities:Variant,IncludedProduct,SpecificItemChoice.
-
-
-
Method Detail
-
priceProduct
Product priceProduct(Product product, @Nullable com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @Nullable com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Populates pricing info for the providedProductand its related priceable entities:Variant,IncludedProduct,SpecificItemChoice.- Parameters:
product- The product to pricepriceContext-PriceContextfrom the original request containing general pricing infopriceInfoContext-PriceInfoContextfrom the original request containing info specific for gettingPriceInfossuch as prefetchedPriceLists.contextInfo-ContextInfofrom the original request containing tenant info- Returns:
- The product with pricing attached.
-
priceProducts
<P extends Product> List<P> priceProducts(Collection<P> products, @Nullable com.broadleafcommerce.pricing.client.domain.context.PriceContext priceContext, @Nullable com.broadleafcommerce.pricing.client.domain.context.PriceInfoContext priceInfoContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Populates pricing info for the providedProductsand their related priceable entities:Variant,IncludedProduct,SpecificItemChoice.- Parameters:
products- The products to pricepriceContext-PriceContextfrom the original request containing general pricing infopriceInfoContext-PriceInfoContextfrom the original request containing info specific for gettingPriceInfossuch as prefetchedPriceLists.contextInfo-ContextInfofrom the original request containing tenant info- Returns:
- The products with pricing attached.
-
-