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

How to use
OverdueStateSet
in
com.ning.billing.overdue.config.api

Best Java code snippets using com.ning.billing.overdue.config.api.OverdueStateSet (Showing top 4 results out of 315)

origin: com.ning.billing/killbill-overdue

public OverdueState refresh(final InternalCallContext context) throws OverdueException, OverdueApiException {
  if (overdueStateSet.size() < 1) { // No configuration available
    return overdueStateSet.getClearState();
  }
  final BillingState billingState = billingState(context);
  final String previousOverdueStateName = api.getBlockingStateForService(overdueable.getId(), BlockingStateType.ACCOUNT, OverdueService.OVERDUE_SERVICE_NAME, context).getStateName();
  final OverdueState currentOverdueState = overdueStateSet.findState(previousOverdueStateName);
  final OverdueState nextOverdueState = overdueStateSet.calculateOverdueState(billingState, clock.getToday(billingState.getAccountTimeZone()));
  overdueStateApplicator.apply(overdueStateSet, billingState, overdueable, currentOverdueState, nextOverdueState, context);
  return nextOverdueState;
}
origin: com.ning.billing/killbill-overdue

public void clear(final InternalCallContext context) throws OverdueException, OverdueApiException {
  final String previousOverdueStateName = api.getBlockingStateForService(overdueable.getId(), BlockingStateType.ACCOUNT, OverdueService.OVERDUE_SERVICE_NAME, context).getStateName();
  final OverdueState previousOverdueState = overdueStateSet.findState(previousOverdueStateName);
  overdueStateApplicator.clear(overdueable, previousOverdueState, overdueStateSet.getClearState(), context);
}
origin: com.ning.billing/killbill-overdue

final OverdueState firstOverdueState = overdueStateSet.getFirstState();
final boolean conditionForNextNotfication = !nextOverdueState.isClearState() ||
  final Period reevaluationInterval = nextOverdueState.isClearState() ? overdueStateSet.getInitialReevaluationInterval() : nextOverdueState.getReevaluationInterval();
origin: com.ning.billing/killbill-overdue

@SuppressWarnings("unchecked")
@Override
public OverdueState getOverdueStateFor(final Account overdueable, final TenantContext context) throws OverdueException {
  try {
    final String stateName = accessApi.getBlockingStateForService(overdueable.getId(), BlockingStateType.ACCOUNT, OverdueService.OVERDUE_SERVICE_NAME, internalCallContextFactory.createInternalTenantContext(context)).getStateName();
    final OverdueStateSet states = overdueConfig.getStateSet();
    return states.findState(stateName);
  } catch (OverdueApiException e) {
    throw new OverdueException(e, ErrorCode.OVERDUE_CAT_ERROR_ENCOUNTERED, overdueable.getId(), overdueable.getClass().getSimpleName());
  }
}
com.ning.billing.overdue.config.apiOverdueStateSet

Most used methods

  • calculateOverdueState
  • findState
  • getClearState
  • getFirstState
  • getInitialReevaluationInterval
  • size

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • 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
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best plugins for Eclipse
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