this.marshal(of.createDocument(doc), os, validate);
}
private CreditTransferTransactionInformationSCT createCreditTransferTransactionInformationSCT(Properties sepaParams, Integer index)
{
CreditTransferTransactionInformationSCT cdtTrxTxInf = new CreditTransferTransactionInformationSCT();
//Payment Information - Credit Transfer Transaction Information - Payment Identification
cdtTrxTxInf.setPmtId(new PaymentIdentification1());
cdtTrxTxInf.getPmtId().setEndToEndId(SepaUtil.getProperty(sepaParams,SepaUtil.insertIndex("endtoendid", index),AbstractSEPAGV.ENDTOEND_ID_NOTPROVIDED)); // sicherstellen, dass "NOTPROVIDED" eingetragen wird, wenn keine ID angegeben ist
//Payment Information - Credit Transfer Transaction Information - Creditor
cdtTrxTxInf.setCdtr(new PartyIdentificationSCT2());
cdtTrxTxInf.getCdtr().setNm(sepaParams.getProperty(SepaUtil.insertIndex("dst.name", index)));
//Payment Information - Credit Transfer Transaction Information - Creditor Account
cdtTrxTxInf.setCdtrAcct(new CashAccountSCT2());
cdtTrxTxInf.getCdtrAcct().setId(new AccountIdentificationSCT());
cdtTrxTxInf.getCdtrAcct().getId().setIBAN(sepaParams.getProperty(SepaUtil.insertIndex("dst.iban", index)));
//Payment Information - Credit Transfer Transaction Information - Creditor Agent
cdtTrxTxInf.setCdtrAgt(new BranchAndFinancialInstitutionIdentificationSCT());
cdtTrxTxInf.getCdtrAgt().setFinInstnId(new FinancialInstitutionIdentificationSCT());
cdtTrxTxInf.getCdtrAgt().getFinInstnId().setBIC(sepaParams.getProperty(SepaUtil.insertIndex("dst.bic", index)));
//Payment Information - Credit Transfer Transaction Information - Amount
cdtTrxTxInf.setAmt(new AmountTypeSCT());
cdtTrxTxInf.getAmt().setInstdAmt(new CurrencyAndAmountSCT());
cdtTrxTxInf.getAmt().getInstdAmt().setValue(new BigDecimal(sepaParams.getProperty(SepaUtil.insertIndex("btg.value", index))));
cdtTrxTxInf.getAmt().getInstdAmt().setCcy(CurrencyCodeSCT.EUR);
//Payment Information - Credit Transfer Transaction Information - Usage
String usage = sepaParams.getProperty(SepaUtil.insertIndex("usage", index));
if (usage != null && usage.length() > 0)
{
cdtTrxTxInf.setRmtInf(new RemittanceInformationSCTChoice());
cdtTrxTxInf.getRmtInf().setUstrd(usage);
}
return cdtTrxTxInf;
}