Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BVPSD2-256 AIS BalanceType expected (Vormerksaldo) #145

Merged
merged 1 commit into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class BalancesReport {

private Balance readyBalance;
private Balance unreadyBalance;
private Balance reservedBalance;
private Balance creditBalance;
private Balance availableBalance;
private Balance usedBalance;
Expand All @@ -37,6 +38,11 @@ public BalancesReport unreadyBalance(Balance unreadyBalance) {
return this;
}

public BalancesReport reservedBalance(Balance reservedBalance) {
this.reservedBalance = reservedBalance;
return this;
}

public BalancesReport creditBalance(Balance creditBalance) {
this.creditBalance = creditBalance;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,32 @@ public SinglePaymentJob(TransactionRequest<SinglePayment> transactionRequest, Hb
AbstractHBCIJob createHbciJob() {
SinglePayment singlePayment = transactionRequest.getTransaction();

AbstractSEPAGV paympentJob;
AbstractSEPAGV paymentJob;
if (singlePayment instanceof FutureSinglePayment) {
paympentJob = new GVTermUebSEPA(dialog.getPassport(), GVTermUebSEPA.getLowlevelName());
paympentJob.setParam("date", ((FutureSinglePayment) singlePayment).getExecutionDate().toString());
paymentJob = new GVTermUebSEPA(dialog.getPassport(), GVTermUebSEPA.getLowlevelName());
paymentJob.setParam("date", ((FutureSinglePayment) singlePayment).getExecutionDate().toString());
} else {
if (singlePayment.isInstantPayment()) {
paympentJob = new GVInstantUebSEPA(dialog.getPassport(), GVInstantUebSEPA.getLowlevelName());
paymentJob = new GVInstantUebSEPA(dialog.getPassport(), GVInstantUebSEPA.getLowlevelName());
} else {
paympentJob = new GVUebSEPA(dialog.getPassport(), GVUebSEPA.getLowlevelName());
paymentJob = new GVUebSEPA(dialog.getPassport(), GVUebSEPA.getLowlevelName());
}
}

paympentJob.setParam("src", getHbciKonto());
paympentJob.setParam("dst", createReceiverAccount(singlePayment));
paympentJob.setParam("btg", new Value(singlePayment.getAmount(), singlePayment.getCurrency()));
paymentJob.setParam("src", getHbciKonto());
paymentJob.setParam("dst", createReceiverAccount(singlePayment));
paymentJob.setParam("btg", new Value(singlePayment.getAmount(), singlePayment.getCurrency()));
if (singlePayment.getPurpose() != null) {
paympentJob.setParam("usage", singlePayment.getPurpose());
paymentJob.setParam("usage", singlePayment.getPurpose());
}
if (singlePayment.getPurposecode() != null) {
paympentJob.setParam("purposecode", singlePayment.getPurposecode());
paymentJob.setParam("purposecode", singlePayment.getPurposecode());
}
if (singlePayment.getEndToEndId() != null) {
paympentJob.setParam("endtoendid", singlePayment.getEndToEndId());
paymentJob.setParam("endtoendid", singlePayment.getEndToEndId());
}

return paympentJob;
return paymentJob;
}

private Konto createReceiverAccount(SinglePayment singlePayment) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ default BalancesReport createBalancesReport(GVRSaldoReq gvSaldoReq, String accou
@Mapping(target = "availableBalance", source = "available")
@Mapping(target = "creditBalance", source = "kredit")
@Mapping(target = "unreadyBalance", source = "unready")
@Mapping(target = "reservedBalance", source = "reserved")
@Mapping(target = "usedBalance", source = "used")
BalancesReport toBalancesReport(GVRSaldoReq.Info saldoInfo);

Expand Down