Codota Logo
DefaultOverdueState
Code IndexAdd Codota to your IDE (free)

How to use
DefaultOverdueState
in
com.ning.billing.overdue.config

Best Java code snippets using com.ning.billing.overdue.config.DefaultOverdueState (Showing top 5 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-overdue

@Override
public DefaultOverdueState calculateOverdueState(final BillingState billingState, final LocalDate now) throws OverdueApiException {
  for (final DefaultOverdueState overdueState : getStates()) {
    if (overdueState.getCondition() != null && overdueState.getCondition().evaluate(billingState, now)) {
      return overdueState;
    }
  }
  return getClearState();
}
origin: com.ning.billing/killbill-overdue

@Override
public OverdueState findState(final String stateName) throws OverdueApiException {
  if (stateName.equals(DefaultBlockingState.CLEAR_STATE_NAME)) {
    return clearState;
  }
  for (final DefaultOverdueState state : getStates()) {
    if (state.getName().equals(stateName)) {
      return state;
    }
  }
  throw new OverdueApiException(ErrorCode.CAT_NO_SUCH_OVEDUE_STATE, stateName);
}
origin: com.ning.billing/killbill-overdue

  @SuppressWarnings("unchecked")
  public MockOverdueRules() {
    final OverdueStatesAccount bundleODS = new OverdueStatesAccount();
    bundleODS.setAccountOverdueStates(new DefaultOverdueState[]{new DefaultOverdueState().setName(CLEAR_STATE)});
    setOverdueStates(bundleODS);

  }
}
origin: com.ning.billing/killbill-overdue

@Override
public ValidationErrors validate(final OverdueConfig root,
                 final ValidationErrors errors) {
  for (final DefaultOverdueState state : getStates()) {
    state.validate(root, errors);
  }
  try {
    getClearState();
  } catch (OverdueApiException e) {
    if (e.getCode() == ErrorCode.CAT_MISSING_CLEAR_STATE.getCode()) {
      errors.add("Overdue state set is missing a clear state.",
            root.getURI(), this.getClass(), "");
    }
  }
  return errors;
}
origin: com.ning.billing/killbill-overdue

Assert.assertEquals(c.getStateSet().size(), 2);
Assert.assertNull(c.getStateSet().getStates()[0].getEnterStateEmailNotification());
final EmailNotification secondNotification = c.getStateSet().getStates()[1].getEnterStateEmailNotification();
Assert.assertEquals(secondNotification.getSubject(), "ToTo");
Assert.assertEquals(secondNotification.getTemplateName(), "Titi");
com.ning.billing.overdue.configDefaultOverdueState

Most used methods

  • <init>
  • getCondition
  • getEnterStateEmailNotification
  • getName
  • setName
  • validate

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • getSystemService (Context)
  • putExtra (Intent)
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JLabel (javax.swing)
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