Codota Logo
OverdueState.getEnterStateEmailNotification
Code IndexAdd Codota to your IDE (free)

How to use
getEnterStateEmailNotification
method
in
com.ning.billing.overdue.OverdueState

Best Java code snippets using com.ning.billing.overdue.OverdueState.getEnterStateEmailNotification (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: com.ning.billing/killbill-overdue

  public String generateEmail(final Account account, final BillingState billingState,
                           final Account overdueable, final OverdueState nextOverdueState) throws IOException {
    final Map<String, Object> data = new HashMap<String, Object>();

    // TODO raw objects for now. We eventually should respect the account locale and support translations
    data.put("account", account);
    data.put("billingState", overdueEmailFormatterFactory.createBillingStateFormatter(billingState));
    data.put("overdueable", overdueable);
    data.put("nextOverdueState", nextOverdueState);

    // TODO single template for all languages for now
    return templateEngine.executeTemplate(nextOverdueState.getEnterStateEmailNotification().getTemplateName(), data);
  }
}
origin: com.ning.billing/killbill-overdue

private void sendEmailIfRequired(final BillingState billingState, final Account account,
                 final OverdueState nextOverdueState, final InternalTenantContext context) {
  // Note: we don't want to fail the full refresh call because sending the email failed.
  // That's the reason why we catch all exceptions here.
  // The alternative would be to: throw new OverdueApiException(e, ErrorCode.EMAIL_SENDING_FAILED);
  // If sending is not configured, skip
  if (nextOverdueState.getEnterStateEmailNotification() == null) {
    return;
  }
  final List<String> to = ImmutableList.<String>of(account.getEmail());
  // TODO - should we look at the account CC: list?
  final List<String> cc = ImmutableList.<String>of();
  final String subject = nextOverdueState.getEnterStateEmailNotification().getSubject();
  try {
    // Generate and send the email
    final String emailBody = overdueEmailGenerator.generateEmail(account, billingState, account, nextOverdueState);
    if (nextOverdueState.getEnterStateEmailNotification().isHTML()) {
      emailSender.sendHTMLEmail(to, cc, subject, emailBody);
    } else {
      emailSender.sendPlainTextEmail(to, cc, subject, emailBody);
    }
  } catch (IOException e) {
    log.warn(String.format("Unable to generate or send overdue notification email for account %s and overdueable %s", account.getId(), account.getId()), e);
  } catch (EmailApiException e) {
    log.warn(String.format("Unable to send overdue notification email for account %s and overdueable %s", account.getId(), account.getId()), e);
  } catch (MustacheException e) {
    log.warn(String.format("Unable to generate overdue notification email for account %s and overdueable %s", account.getId(), account.getId()), e);
  }
}
com.ning.billing.overdueOverdueStategetEnterStateEmailNotification

Popular methods of OverdueState

  • blockChanges
  • disableEntitlementAndChangesBlocked
  • getName
  • getReevaluationInterval
  • isClearState
  • getDaysBetweenPaymentRetries
  • getExternalMessage
  • getSubscriptionCancellationPolicy

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • JTextField (javax.swing)
  • Option (scala)
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