Search in sources :

Example 1 with ApiEventBase

use of org.killbill.billing.subscription.events.user.ApiEventBase in project killbill by killbill.

the class TestPlanAligner method createSubscriptionEvent.

private SubscriptionBaseEvent createSubscriptionEvent(final DateTime effectiveDate, final String productName, final PhaseType phaseType, final ApiEventType apiEventType) {
    final ApiEventBuilder eventBuilder = new ApiEventBuilder();
    eventBuilder.setEffectiveDate(effectiveDate);
    eventBuilder.setEventPlan(productName);
    eventBuilder.setEventPlanPhase(productName + "-" + phaseType.toString().toLowerCase());
    eventBuilder.setEventPriceList(priceList);
    // We don't really use the following but the code path requires it
    eventBuilder.setFromDisk(true);
    return new ApiEventBase(eventBuilder.setApiEventType(apiEventType));
}
Also used : ApiEventBase(org.killbill.billing.subscription.events.user.ApiEventBase) ApiEventBuilder(org.killbill.billing.subscription.events.user.ApiEventBuilder)

Aggregations

ApiEventBase (org.killbill.billing.subscription.events.user.ApiEventBase)1 ApiEventBuilder (org.killbill.billing.subscription.events.user.ApiEventBuilder)1