cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to retrieve one time charges

Former Member
0 Kudos

Hello Experts,

I'm currently using Financial Accelerator 6.6.

I'm trying to get the one time charge entries for a certain product. However, I only have productModel, policyModel and orderModel which I was not able to find any one time charge entries related data since they are store in the SubsriptionPricePlan which I dont have.

Your help is highly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

first of all, please note that SubscriptionPricePlanModel extends PriceRowModel, so you can use that inheritance to get the one time charge entries.

In addition, below you can find two examples how to get the list of OneTimeChargeEntrie-s, using only Model or Data, probably it will give you an idea how to make it work:

 for (AbstractOrderEntryModel entry : orderModel.getEntries())
 {
     if (entry.getProduct() instanceof SubscriptionProductModel)
     {
         SubscriptionPricePlanModel pricePlanModel = getSubscriptionCommercePriceService().getSubscriptionPricePlanForEntry(entry);
         Collection<OneTimeChargeEntryModel> oneTimeChargeEntryModels = pricePlanModel.getOneTimeChargeEntries();
     }
 }
 

//or if you can work with ProductData

 SubscriptionPricePlanData subscriptionPricePlanData = (SubscriptionPricePlanData) productData.getPrice();
 List<OneTimeChargeEntryData> oneTimeChargeEntries = subscriptionPricePlanData.getOneTimeChargeEntries();

Former Member
0 Kudos

It worked. Thanks alot for your help, Branislav.

Answers (0)