class DataPayload {

    @JsonIgnore
    public DataPayload updatePayload(BiFunction<DataPayload, String, String> ibanGenerator, String branch, Currency currency, boolean generatePayments) {
        this.branch = branch;
        this.generatePayments = generatePayments;
        this.accounts.forEach(a -> {
            a.setIban(ibanGenerator.apply(this, a.getIban()));
            a.setCurrency(currency);
        });
        this.balancesList.forEach(b -> {
            b.setIban(ibanGenerator.apply(this, b.getIban()));
            b.setCurrency(currency);
        });

        this.users.forEach(u -> updateUserAndAccesses(ibanGenerator, u, branch, currency));
        return this;
    }

}