use of org.killbill.billing.account.api.user.DefaultAccountChangeEvent in project killbill by killbill.
the class MockAccountDao method update.
@Override
public void update(final AccountModelDao account, final InternalCallContext context) {
super.update(account, context);
final AccountModelDao currentAccount = getById(account.getId(), context);
final Long accountRecordId = getRecordId(account.getId(), context);
final long tenantRecordId = context == null ? InternalCallContextFactory.INTERNAL_TENANT_RECORD_ID : context.getTenantRecordId();
final AccountChangeInternalEvent changeEvent = new DefaultAccountChangeEvent(account.getId(), currentAccount, account, accountRecordId, tenantRecordId, UUID.randomUUID(), clock.getUTCNow());
if (changeEvent.hasChanges()) {
try {
eventBus.post(changeEvent);
} catch (final EventBusException ex) {
Assert.fail(ex.toString());
}
}
}
Aggregations