use of org.killbill.billing.jaxrs.json.PhasePriceJson in project killbill by killbill.
the class SubscriptionResourceHelpers method buildPlanPhasePriceOverrides.
public static List<PlanPhasePriceOverride> buildPlanPhasePriceOverrides(final Iterable<PhasePriceJson> priceOverrides, final Currency currency, final PlanPhaseSpecifier planPhaseSpecifier) {
final List<PlanPhasePriceOverride> overrides = new LinkedList<PlanPhasePriceOverride>();
if (priceOverrides != null) {
for (final PhasePriceJson input : priceOverrides) {
Preconditions.checkNotNull(input);
final List<UsagePriceOverride> usagePrices = new LinkedList<UsagePriceOverride>();
if (input.getUsagePrices() != null) {
buildUsagePrices(currency, input, usagePrices);
}
overrides.add(buildPlanPhasePriceOverride(planPhaseSpecifier, currency, input, usagePrices));
}
}
return overrides;
}
Aggregations