All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.inisos.bank4j.CreditTransfer Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
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);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy