@Override public AuditLogsForPayments getAuditLogsForPayments( final List<Payment> payments, final AuditLevel auditLevel, final TenantContext context) { final Map<UUID, List<AuditLog>> paymentsAuditLogs = new HashMap<UUID, List<AuditLog>>(); for (final Payment payment : payments) { paymentsAuditLogs.put( payment.getId(), getAuditLogs(payment.getId(), ObjectType.PAYMENT, auditLevel, context)); } return new DefaultAuditLogsForPayments(paymentsAuditLogs); }
public BusinessAccountModelDao( final Account account, final Long accountRecordId, final BigDecimal balance, @Nullable final Invoice lastInvoice, @Nullable final Payment lastPayment, final Integer nbActiveBundles, @Nullable final AuditLog creationAuditLog, final Long tenantRecordId, @Nullable final ReportGroup reportGroup) { this( account.getEmail(), account.getFirstNameLength(), account.getCurrency() == null ? null : account.getCurrency().toString(), account.getBillCycleDayLocal(), account.getPaymentMethodId(), account.getTimeZone() == null ? null : account.getTimeZone().toString(), account.getLocale(), account.getAddress1(), account.getAddress2(), account.getCompanyName(), account.getCity(), account.getStateOrProvince(), account.getCountry(), account.getPostalCode(), account.getPhone(), account.isMigrated(), account.isNotifiedForInvoices(), account.getUpdatedDate(), balance, lastInvoice == null ? null : lastInvoice.getInvoiceDate(), lastPayment == null ? null : lastPayment.getEffectiveDate(), lastPayment == null ? null : lastPayment.getPaymentStatus().toString(), nbActiveBundles, account.getCreatedDate(), creationAuditLog != null ? creationAuditLog.getUserName() : null, creationAuditLog != null ? creationAuditLog.getReasonCode() : null, creationAuditLog != null ? creationAuditLog.getComment() : null, account.getId(), account.getName(), account.getExternalKey(), accountRecordId, tenantRecordId, reportGroup); }