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

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

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

origin: com.ning.billing/killbill-overdue

@SuppressWarnings("unchecked")
public OverdueWrapper createOverdueWrapperFor(final UUID id, final InternalTenantContext context) throws OverdueException {
  try {
    Account account = accountApi.getAccountById(id, context);
    return new OverdueWrapper(account, api, getOverdueStateSet(),
                 clock, billingStateCalculator, overdueStateApplicator);
  } catch (AccountApiException e) {
    throw new OverdueException(e);
  }
}
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());
  }
}
origin: com.ning.billing/killbill-overdue

  private boolean isAccountTaggedWith_OVERDUE_ENFORCEMENT_OFF(final InternalCallContext context) throws OverdueException {

    try {
      final UUID accountId = accountApi.getByRecordId(context.getAccountRecordId(), context);

      final List<Tag> accountTags = tagApi.getTags(accountId, ObjectType.ACCOUNT, context);
      for (Tag cur : accountTags) {
        if (cur.getTagDefinitionId().equals(ControlTagType.OVERDUE_ENFORCEMENT_OFF.getId())) {
          return true;
        }
      }
      return false;
    } catch (AccountApiException e) {
      throw new OverdueException(e);
    }
  }
}
origin: com.ning.billing/killbill-overdue

protected void storeNewState(final Account blockable, final OverdueState nextOverdueState, final InternalCallContext context) throws OverdueException {
  try {
    blockingApi.setBlockingState(new DefaultBlockingState(blockable.getId(),
                               BlockingStateType.ACCOUNT,
                               nextOverdueState.getName(),
                               OverdueService.OVERDUE_SERVICE_NAME,
                               blockChanges(nextOverdueState),
                               blockEntitlement(nextOverdueState),
                               blockBilling(nextOverdueState),
                               clock.getUTCNow()),
                   context);
  } catch (Exception e) {
    throw new OverdueException(e, ErrorCode.OVERDUE_CAT_ERROR_ENCOUNTERED, blockable.getId(), blockable.getClass().getName());
  }
}
origin: com.ning.billing/killbill-overdue

      throw new OverdueException(e);
throw new OverdueException(e);
origin: com.ning.billing/killbill-overdue

public void clear(final Account account, final OverdueState previousOverdueState, final OverdueState clearState, final InternalCallContext context) throws OverdueException {
  log.debug("OverdueStateApplicator:clear : time = " + clock.getUTCNow() + ", previousState = " + previousOverdueState.getName());
  storeNewState(account, clearState, context);
  clearFutureNotification(account, context);
  try {
    avoid_extra_credit_by_toggling_AUTO_INVOICE_OFF(account, previousOverdueState, clearState, context);
  } catch (OverdueApiException e) {
    throw new OverdueException(e);
  }
  try {
    bus.post(createOverdueEvent(account, previousOverdueState.getName(), clearState.getName(), isBlockBillingTransition(previousOverdueState, clearState),
                  isUnblockBillingTransition(previousOverdueState, clearState), context));
  } catch (Exception e) {
    log.error("Error posting overdue change event to bus", e);
  }
}
origin: com.ning.billing/killbill-overdue

throw new OverdueException(e);
com.ning.billing.overdue.config.apiOverdueException

Most used methods

  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • getSystemService (Context)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Github Copilot 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