Class TmaAbstractOrderDiscountAlterationPriceBuilder
java.lang.Object
de.hybris.platform.b2ctelcoservices.pricing.strategy.builder.orderentry.impl.TmaAbstractOrderDiscountAlterationPriceBuilder
- All Implemented Interfaces:
TmaAbstractOrderEntryPopPriceBuilder<TmaDiscountProdOfferPriceAlterationModel>
public class TmaAbstractOrderDiscountAlterationPriceBuilder
extends Object
implements TmaAbstractOrderEntryPopPriceBuilder<TmaDiscountProdOfferPriceAlterationModel>
Builder that creates an
TmaAbstractOrderPriceModel from the discount price alteration component- Since:
- 2023
-
Constructor Summary
ConstructorsConstructorDescriptionTmaAbstractOrderDiscountAlterationPriceBuilder(de.hybris.platform.servicelayer.model.ModelService modelService, TmaRetrieveTaxRateStrategy tmaRetrieveTaxRateStrategy) -
Method Summary
Modifier and TypeMethodDescriptionbuildPrice(TmaDiscountProdOfferPriceAlterationModel productOfferingPrice, AbstractOrderEntryModel entry, List<de.hybris.platform.util.TaxValue> taxes) Builds aTmaAbstractOrderPriceModelfor the given param.protected de.hybris.platform.servicelayer.model.ModelServiceprotected TmaRetrieveTaxRateStrategyprotected voidPopulates theTmaAbstractOrderPriceModel.getCatalogCode()withTmaProductOfferingPriceModel.getId()value.protected voidpopulateName(TmaProductOfferingPriceModel source, TmaAbstractOrderPriceModel target) protected voidpopulatePriceValues(Double price, AbstractOrderEntryModel entry, List<de.hybris.platform.util.TaxValue> taxes, TmaAbstractOrderComponentPriceModel priceComponent) Populates the price values for the order entry price charge.
-
Constructor Details
-
TmaAbstractOrderDiscountAlterationPriceBuilder
public TmaAbstractOrderDiscountAlterationPriceBuilder(de.hybris.platform.servicelayer.model.ModelService modelService, TmaRetrieveTaxRateStrategy tmaRetrieveTaxRateStrategy)
-
-
Method Details
-
buildPrice
public TmaAbstractOrderPriceModel buildPrice(TmaDiscountProdOfferPriceAlterationModel productOfferingPrice, AbstractOrderEntryModel entry, List<de.hybris.platform.util.TaxValue> taxes) Description copied from interface:TmaAbstractOrderEntryPopPriceBuilderBuilds aTmaAbstractOrderPriceModelfor the given param.- Specified by:
buildPricein interfaceTmaAbstractOrderEntryPopPriceBuilder<TmaDiscountProdOfferPriceAlterationModel>- Parameters:
productOfferingPrice- the product offering price used to create and populate the order entry prices listentry- the order entry for which the price is createdtaxes- the taxes to be applied on the order price- Returns:
- the list of order entry prices
-
populatePriceValues
protected void populatePriceValues(Double price, AbstractOrderEntryModel entry, List<de.hybris.platform.util.TaxValue> taxes, TmaAbstractOrderComponentPriceModel priceComponent) Populates the price values for the order entry price charge. If the price is net then the taxes are added to the duty free amount value, otherwise the taxes are subtracted from the duty free amount value- Parameters:
price- the price value to be set on the chargeentry- the entry for which the price charge is populatedtaxes- the taxes to be appliedpriceComponent- the component for which the price is populated
-
populateCatalogCode
protected void populateCatalogCode(TmaProductOfferingPriceModel source, TmaAbstractOrderPriceModel target) Populates theTmaAbstractOrderPriceModel.getCatalogCode()withTmaProductOfferingPriceModel.getId()value.- Parameters:
source- the product offering price based on which the catalog code will be populatedtarget- the cart price for which the catalog code will be populated
-
populateName
-
getModelService
protected de.hybris.platform.servicelayer.model.ModelService getModelService() -
getTmaRetrieveTaxRateStrategy
-