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

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

Best Java code snippets using com.ning.billing.invoice.template.HtmlInvoiceGenerator (Showing top 6 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

@Override
@BeforeClass(groups = "fast")
public void beforeClass() throws Exception {
  super.beforeClass();
  final TranslatorConfig config = new ConfigurationObjectFactory(System.getProperties()).build(TranslatorConfig.class);
  final TemplateEngine templateEngine = new MustacheTemplateEngine();
  final InvoiceFormatterFactory factory = new DefaultInvoiceFormatterFactory();
  g = new HtmlInvoiceGenerator(factory, templateEngine, config, null);
}
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.templateHtmlInvoiceGenerator

Most used methods

  • generateInvoice
  • <init>

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • putExtra (Intent)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • CodeWhisperer alternatives
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