Codota Logo
PlanPhase.getFixedPrice
Code IndexAdd Codota to your IDE (free)

How to use
getFixedPrice
method
in
com.ning.billing.catalog.api.PlanPhase

Best Java code snippets using com.ning.billing.catalog.api.PlanPhase.getFixedPrice (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: com.ning.billing/killbill-junction

private void checkFirstEvent(final SortedSet<BillingEvent> events, final Plan nextPlan,
               final int BCD, final UUID id, final DateTime time, final PlanPhase nextPhase, final String desc) throws CatalogApiException {
  Assert.assertEquals(events.size(), 1);
  checkEvent(events.first(), nextPlan, BCD, id, time, nextPhase, desc, nextPhase.getFixedPrice(), nextPhase.getRecurringPrice());
}
origin: com.ning.billing/killbill-junction

@Test(groups = "fast")
public void testBillingEventsWithBlock() throws CatalogApiException, AccountApiException {
  final Plan nextPlan = catalog.findPlan("PickupTrialEvergreen10USD", clock.getUTCNow());
  final PlanPhase nextPhase = nextPlan.getAllPhases()[1];
  final DateTime now = createSubscriptionCreationEvent(nextPlan, nextPhase);
  final Account account = createAccount(32);
  blockingStateDao.setBlockingState(new DefaultBlockingState(bunId, BlockingStateType.SUBSCRIPTION_BUNDLE,  DISABLED_BUNDLE, "test", true, true, true, now.plusDays(1)), clock, internalCallContext);
  blockingStateDao.setBlockingState(new DefaultBlockingState(bunId, BlockingStateType.SUBSCRIPTION_BUNDLE, CLEAR_BUNDLE, "test", false, false, false, now.plusDays(2)), clock, internalCallContext);
  final SortedSet<BillingEvent> events = billingInternalApi.getBillingEventsForAccountAndUpdateAccountBCD(account.getId(), internalCallContext);
  Assert.assertEquals(events.size(), 3);
  final Iterator<BillingEvent> it = events.iterator();
  checkEvent(it.next(), nextPlan, account.getBillCycleDayLocal(), subId, now, nextPhase, SubscriptionBaseTransitionType.CREATE.toString(), nextPhase.getFixedPrice(), nextPhase.getRecurringPrice());
  checkEvent(it.next(), nextPlan, account.getBillCycleDayLocal(), subId, now.plusDays(1), nextPhase, SubscriptionBaseTransitionType.START_BILLING_DISABLED.toString(), null, null);
  checkEvent(it.next(), nextPlan, account.getBillCycleDayLocal(), subId, now.plusDays(2), nextPhase, SubscriptionBaseTransitionType.END_BILLING_DISABLED.toString(), nextPhase.getFixedPrice(), nextPhase.getRecurringPrice());
}
origin: com.ning.billing/killbill-invoice

private BillingEvent createBillingEvent(final UUID subscriptionId, final UUID bundleId, final LocalDate startDate,
                    final Plan plan, final PlanPhase planPhase, final int billCycleDayLocal) throws CatalogApiException {
  final SubscriptionBase sub = createSubscription(subscriptionId, bundleId);
  final Currency currency = Currency.USD;
  return invoiceUtil.createMockBillingEvent(null, sub, startDate.toDateTimeAtStartOfDay(), plan, planPhase,
                       planPhase.getFixedPrice() == null ? null : planPhase.getFixedPrice().getPrice(currency),
                       planPhase.getRecurringPrice() == null ? null : planPhase.getRecurringPrice().getPrice(currency),
                       currency, planPhase.getBillingPeriod(),
                       billCycleDayLocal, BillingModeType.IN_ADVANCE, "Test", 1L, SubscriptionBaseTransitionType.CREATE);
}
origin: com.ning.billing/killbill-junction

public DefaultBillingEvent(final Account account, final EffectiveSubscriptionInternalEvent transition, final SubscriptionBase subscription, final int billCycleDayLocal, final Currency currency, final Catalog catalog) throws CatalogApiException {
  this.account = account;
  this.billCycleDayLocal = billCycleDayLocal;
  this.subscription = subscription;
  effectiveDate = transition.getEffectiveTransitionTime();
  final String planPhaseName = (transition.getTransitionType() != SubscriptionBaseTransitionType.CANCEL) ?
      transition.getNextPhase() : transition.getPreviousPhase();
  planPhase = (planPhaseName != null) ? catalog.findPhase(planPhaseName, transition.getEffectiveTransitionTime(), transition.getSubscriptionStartDate()) : null;
  final String planName = (transition.getTransitionType() != SubscriptionBaseTransitionType.CANCEL) ?
      transition.getNextPlan() : transition.getPreviousPlan();
  plan = (planName != null) ? catalog.findPlan(planName, transition.getEffectiveTransitionTime(), transition.getSubscriptionStartDate()) : null;
  final String nextPhaseName = transition.getNextPhase();
  final PlanPhase nextPhase = (nextPhaseName != null) ? catalog.findPhase(nextPhaseName, transition.getEffectiveTransitionTime(), transition.getSubscriptionStartDate()) : null;
  final String prevPhaseName = transition.getPreviousPhase();
  final PlanPhase prevPhase = (prevPhaseName != null) ? catalog.findPhase(prevPhaseName, transition.getEffectiveTransitionTime(), transition.getSubscriptionStartDate()) : null;
  fixedPrice = (nextPhase != null && nextPhase.getFixedPrice() != null) ? nextPhase.getFixedPrice().getPrice(currency) : null;
  recurringPrice = (nextPhase != null && nextPhase.getRecurringPrice() != null) ? nextPhase.getRecurringPrice().getPrice(currency) : null;
  this.currency = currency;
  description = transition.getTransitionType().toString();
  billingModeType = BillingModeType.IN_ADVANCE;
  billingPeriod = (transition.getTransitionType() != SubscriptionBaseTransitionType.CANCEL) ?
      nextPhase.getBillingPeriod() : prevPhase.getBillingPeriod();
  type = transition.getTransitionType();
  totalOrdering = transition.getTotalOrdering();
  timeZone = account.getTimeZone();
}
com.ning.billing.catalog.apiPlanPhasegetFixedPrice

Popular methods of PlanPhase

  • getName
  • getRecurringPrice
  • getPhaseType
  • getBillingPeriod
  • getDuration
  • compliesWithLimits

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • getContentResolver (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JFileChooser (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now