use of org.killbill.billing.mock.MockEffectiveSubscriptionEvent in project killbill by killbill.
the class TestBillingApi method createSubscriptionCreationEvent.
private DateTime createSubscriptionCreationEvent(final Plan nextPlan, final PlanPhase nextPhase) throws CatalogApiException {
final DateTime now = clock.getUTCNow();
final DateTime then = now.minusDays(1);
final EffectiveSubscriptionInternalEvent t = new MockEffectiveSubscriptionEvent(eventId, subId, bunId, bunKey, then, now, null, null, null, null, null, EntitlementState.ACTIVE, nextPlan.getName(), nextPhase.getName(), nextPlan.getPriceList().getName(), null, 1L, SubscriptionBaseTransitionType.CREATE, 1, null, 1L, 2L, null);
effectiveSubscriptionTransitions.add(t);
billingTransitions.add(new DefaultSubscriptionBillingEvent(SubscriptionBaseTransitionType.CREATE, nextPlan, nextPhase, now, 1L, null, CatalogDateHelper.toUTCDateTime(nextPlan.getCatalog().getEffectiveDate())));
return now;
}
Aggregations