public interface AccountFeeLogServiceLocal extends AccountFeeLogService
AccountFeeLogService| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_ACCOUNT
Script attribute: user account being charged
|
static java.lang.String |
ATTR_EXECUTION_DATE
Script attribute: the expected execution date
|
static java.lang.String |
ATTR_FEE
Script attribute: fee being charged
|
| Modifier and Type | Method and Description |
|---|---|
java.math.BigDecimal |
calculateAmount(AccountFeeLog execution,
UserAccount account)
Calculates the amount to be charged for the given user account on the given fee execution.
|
java.math.BigDecimal |
calculateReservedAmount(AccountFee accountFee,
UserAccount userAccount)
Returns the reserved amount for an account fee over a given account
|
boolean |
chargeNext(AccountFeeLog log)
Invoked by
ChargeAccountFeeBackgroundTask outside the transactional scope. |
AccountFeeLog |
getLastExecution(AccountFee accountFee)
Returns the last execution log for a given fee, or null if it was never charged
|
java.util.Date |
getNextExecutionDate(AccountFee accountFee,
AccountFeeLog lastExecution)
Returns the next date the given fee should be executed, or null if the fee is disabled or manual
|
long |
insertMissingScheduledExecutions()
For each enabled scheduled fee, inserts all missing
AccountFeeLogs |
void |
markFinished(AccountFeeLog log)
Marks the
AccountFeeLog with the given id as finished charging |
getData, getSearchData, listFeeExecutions, rechargeFailed, runNow, searchstatic final java.lang.String ATTR_FEE
static final java.lang.String ATTR_ACCOUNT
static final java.lang.String ATTR_EXECUTION_DATE
java.math.BigDecimal calculateAmount(AccountFeeLog execution, UserAccount account)
java.math.BigDecimal calculateReservedAmount(AccountFee accountFee, UserAccount userAccount)
boolean chargeNext(AccountFeeLog log)
ChargeAccountFeeBackgroundTask outside the transactional scope. Charges the next account for
the given account fee log,
returning true if some account was charged or false if there was nothing else to chargeAccountFeeLog getLastExecution(AccountFee accountFee)
java.util.Date getNextExecutionDate(AccountFee accountFee, AccountFeeLog lastExecution)
long insertMissingScheduledExecutions()
AccountFeeLogsvoid markFinished(AccountFeeLog log)
AccountFeeLog with the given id as finished charging