Tabnine Logo
InAdvanceBillingMode
Code IndexAdd Tabnine to your IDE (free)

How to use
InAdvanceBillingMode
in
com.ning.billing.invoice.model

Best Java code snippets using com.ning.billing.invoice.model.InAdvanceBillingMode (Showing top 4 results out of 315)

origin: com.ning.billing/killbill-invoice

private BillingMode instantiateBillingMode(final BillingModeType billingMode) {
  switch (billingMode) {
    case IN_ADVANCE:
      return new InAdvanceBillingMode();
    default:
      throw new UnsupportedOperationException();
  }
}
origin: com.ning.billing/killbill-invoice

  private void verifyInvoiceItems(final LocalDate startDate, final LocalDate endDate, final LocalDate targetDate,
                  final DateTimeZone dateTimeZone, final int billingCycleDayLocal, final BillingPeriod billingPeriod,
                  final LinkedHashMap<LocalDate, LocalDate> expectedDates) throws InvalidDateSequenceException {
    final InAdvanceBillingMode billingMode = new InAdvanceBillingMode();

    final List<RecurringInvoiceItemData> invoiceItems = billingMode.calculateInvoiceItemData(startDate, endDate, targetDate, billingCycleDayLocal, billingPeriod);

    int i = 0;
    for (final LocalDate periodStartDate : expectedDates.keySet()) {
      Assert.assertEquals(invoiceItems.get(i).getStartDate(), periodStartDate);
      Assert.assertEquals(invoiceItems.get(i).getEndDate(), expectedDates.get(periodStartDate));
      Assert.assertTrue(invoiceItems.get(0).getNumberOfCycles().compareTo(BigDecimal.ONE) <= 0);
      i++;
    }
    Assert.assertEquals(invoiceItems.size(), i);
  }
}
origin: com.ning.billing/killbill-invoice

  @Override
  protected BillingMode getBillingMode() {
    return new InAdvanceBillingMode();
  }
}
origin: com.ning.billing/killbill-invoice

@Override
protected BillingMode getBillingMode() {
  return new InAdvanceBillingMode();
}
com.ning.billing.invoice.modelInAdvanceBillingMode

Most used methods

  • <init>
  • calculateInvoiceItemData

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Runner (org.openjdk.jmh.runner)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now