Interface SubscriptionCommercePriceService
- All Superinterfaces:
CommercePriceService
- All Known Implementing Classes:
DefaultSubscriptionCommercePriceService
Extends the
CommercePriceService in order to retrieve the applicable SubscriptionPricePlanModel for a
product as the CommercePriceService returns the price information only. The standard filtering functionality
for PriceRowModels of the active PriceFactory is used.- Spring Bean ID:
- subscriptionCommercePriceService
-
Method Summary
Modifier and TypeMethodDescriptionReturns the first recurring price of the givenSubscriptionPricePlanModel.Returns the last recurring price of the givenSubscriptionPricePlanModel.getOneTimeChargeEntryPlan(SubscriptionPricePlanModel pricePlan, BillingEventModel billingEvent) Returns the one time charge entry of the givenSubscriptionPricePlanModel.Search aSubscriptionPricePlanModelfor the givenentry's product.default SubscriptionPricePlanModelgetSubscriptionPricePlanForProduct(ProductModel subscriptionProduct) Search aSubscriptionPricePlanModelfor the givensubscriptionProduct.Methods inherited from interface de.hybris.platform.commerceservices.price.CommercePriceService
getFromPriceForProduct, getWebPriceForProduct
-
Method Details
-
getSubscriptionPricePlanForProduct
@Nullable default SubscriptionPricePlanModel getSubscriptionPricePlanForProduct(@Nonnull ProductModel subscriptionProduct) Search aSubscriptionPricePlanModelfor the givensubscriptionProduct.- Parameters:
subscriptionProduct- theSubscriptionProductModel- Returns:
- the applicable
SubscriptionPricePlanModelor null
-
getSubscriptionPricePlanForEntry
@Nullable SubscriptionPricePlanModel getSubscriptionPricePlanForEntry(AbstractOrderEntryModel entry) Search aSubscriptionPricePlanModelfor the givenentry's product.- Parameters:
entry- theAbstractOrderEntryModel- Returns:
- the applicable
SubscriptionPricePlanModelor null
-
getFirstRecurringPriceFromPlan
@Nullable RecurringChargeEntryModel getFirstRecurringPriceFromPlan(@Nullable SubscriptionPricePlanModel pricePlan) Returns the first recurring price of the givenSubscriptionPricePlanModel. It is assumed that the recurring prices are sorted in a way so that the price increases as time goes by. Therefore, the returned recurring price is the lowest price. If price logic is different this function must be overridden.- Parameters:
pricePlan-SubscriptionPricePlanModel- Returns:
- the first recurring price of the given
pricePlanor null
-
getLastRecurringPriceFromPlan
@Nullable RecurringChargeEntryModel getLastRecurringPriceFromPlan(@Nullable SubscriptionPricePlanModel pricePlan) Returns the last recurring price of the givenSubscriptionPricePlanModel. It is assumed that the recurring prices are sorted in a way so that the price increases as time goes by. Therefore, the returned recurring price is the highest price. If price logic is different this function must be overridden.- Parameters:
pricePlan-SubscriptionPricePlanModel- Returns:
- the last recurring price of the given
pricePlanor null
-
getOneTimeChargeEntryPlan
@Nullable OneTimeChargeEntryModel getOneTimeChargeEntryPlan(@Nonnull SubscriptionPricePlanModel pricePlan, @Nonnull BillingEventModel billingEvent) Returns the one time charge entry of the givenSubscriptionPricePlanModel.- Parameters:
pricePlan-SubscriptionPricePlanModelbillingEvent-BillingEventModel- Returns:
- the OneTimeChargeEntry
-