@Override public String getPlanPhaseName() { return SubscriptionBaseTransitionType.CANCEL.equals(subscriptionTransitionType) ? null : "BicycleTrialEvergreen1USD-trial"; }
@Override public PlanPhaseSpecifier getPlanPhaseSpecifier() { return SubscriptionBaseTransitionType.CANCEL.equals(subscriptionTransitionType) ? null : new PlanPhaseSpecifier("BicycleTrialEvergreen1USD", ProductCategory.BASE, BillingPeriod.NO_BILLING_PERIOD, PriceListSet.DEFAULT_PRICELIST_NAME, PhaseType.FIXEDTERM); }
if (SubscriptionBaseTransitionType.START_BILLING_DISABLED.equals(getTransitionType())) { if (SubscriptionBaseTransitionType.END_BILLING_DISABLED.equals(e1.getTransitionType())) { return 1; } else if (SubscriptionBaseTransitionType.START_BILLING_DISABLED.equals(e1.getTransitionType())) { if (SubscriptionBaseTransitionType.END_BILLING_DISABLED.equals(getTransitionType())) { return -1; } else if (SubscriptionBaseTransitionType.END_BILLING_DISABLED.equals(getTransitionType())) { if (SubscriptionBaseTransitionType.START_BILLING_DISABLED.equals(e1.getTransitionType())) { return -1; } else if (SubscriptionBaseTransitionType.END_BILLING_DISABLED.equals(e1.getTransitionType())) { if (SubscriptionBaseTransitionType.START_BILLING_DISABLED.equals(getTransitionType())) {
private void checkEvent(final BillingEvent event, final Plan nextPlan, final int BCD, final UUID id, final DateTime time, final PlanPhase nextPhase, final String desc, final InternationalPrice fixedPrice, final InternationalPrice recurringPrice) throws CatalogApiException { if (fixedPrice != null) { Assert.assertEquals(fixedPrice.getPrice(Currency.USD), event.getFixedPrice()); } else { assertNull(event.getFixedPrice()); } if (recurringPrice != null) { Assert.assertEquals(recurringPrice.getPrice(Currency.USD), event.getRecurringPrice()); } else { assertNull(event.getRecurringPrice()); } Assert.assertEquals(BCD, event.getBillCycleDayLocal()); Assert.assertEquals(id, event.getSubscription().getId()); Assert.assertEquals(time.getDayOfMonth(), event.getEffectiveDate().getDayOfMonth()); Assert.assertEquals(nextPhase, event.getPlanPhase()); Assert.assertEquals(nextPlan, event.getPlan()); if (!SubscriptionBaseTransitionType.START_BILLING_DISABLED.equals(event.getTransitionType())) { Assert.assertEquals(nextPhase.getBillingPeriod(), event.getBillingPeriod()); } Assert.assertEquals(BillingModeType.IN_ADVANCE, event.getBillingMode()); Assert.assertEquals(desc, event.getTransitionType().toString()); }