congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HtmlInvoiceGenerator.generateInvoice
Code IndexAdd Tabnine to your IDE (free)

How to use
generateInvoice
method
in
com.ning.billing.invoice.template.HtmlInvoiceGenerator

Best Java code snippets using com.ning.billing.invoice.template.HtmlInvoiceGenerator.generateInvoice (Showing top 5 results out of 315)

origin: com.ning.billing/killbill-invoice

@Test(groups = "fast")
public void testGenerateEmptyInvoice() throws Exception {
  final Invoice invoice = Mockito.mock(Invoice.class);
  final String output = g.generateInvoice(createAccount(), invoice, false);
  Assert.assertNotNull(output);
}
origin: com.ning.billing/killbill-invoice

@Test(groups = "fast")
public void testGenerateNullInvoice() throws Exception {
  final String output = g.generateInvoice(createAccount(), null, false);
  Assert.assertNull(output);
}
origin: com.ning.billing/killbill-invoice

@Test(groups = "fast")
public void testGenerateInvoice() throws Exception {
  final String output = g.generateInvoice(createAccount(), createInvoice(), false);
  Assert.assertNotNull(output);
}
origin: com.ning.billing/killbill-invoice

@Override
public String getInvoiceAsHTML(final UUID invoiceId, final TenantContext context) throws AccountApiException, IOException, InvoiceApiException {
  final Invoice invoice = getInvoice(invoiceId, context);
  if (invoice == null) {
    throw new InvoiceApiException(ErrorCode.INVOICE_NOT_FOUND, invoiceId);
  }
  final InternalTenantContext internalContext = internalCallContextFactory.createInternalTenantContext(invoiceId, ObjectType.INVOICE, context);
  final Account account = accountUserApi.getAccountById(invoice.getAccountId(), internalContext);
  // Check if this account has the MANUAL_PAY system tag
  boolean manualPay = false;
  final List<Tag> accountTags = tagApi.getTags(account.getId(), ObjectType.ACCOUNT, internalContext);
  for (final Tag tag : accountTags) {
    if (ControlTagType.MANUAL_PAY.getId().equals(tag.getTagDefinitionId())) {
      manualPay = true;
      break;
    }
  }
  return generator.generateInvoice(account, invoice, manualPay);
}
origin: com.ning.billing/killbill-invoice

  htmlBody = generator.generateInvoice(account, invoice, manualPay);
} catch (IOException e) {
  throw new InvoiceApiException(e, ErrorCode.EMAIL_SENDING_FAILED);
com.ning.billing.invoice.templateHtmlInvoiceGeneratorgenerateInvoice

Popular methods of HtmlInvoiceGenerator

  • <init>

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Kernel (java.awt.image)
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JLabel (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • From CI to AI: The AI layer in your organization
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