io.inisos.bank4j.CreditTransfer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bank4j Show documentation
Show all versions of bank4j Show documentation
Generates ISO 20022 XML Transfers and provides IBAN and BIC validation
package io.inisos.bank4j;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Collection;
/**
* A Credit Transfer
*/
public interface CreditTransfer extends Operation {
BankAccount getDebtor();
String getId();
LocalDateTime getExecutionDate();
Collection getTransactions();
default BigDecimal getTotalAmount() {
return getTransactions()
.stream()
.map(Transaction::getAmount)
.reduce(BigDecimal.ZERO, BigDecimal::add);
}
}