Search in sources :

Example 1 with RemittanceInformation5

use of iso.std.iso._20022.tech.xsd.pain_001_001.RemittanceInformation5 in project estatio by estatio.

the class CreditTransfer method asXml.

@Programmatic
public CreditTransferTransactionInformation10 asXml() {
    CreditTransferTransactionInformation10 cdtTrfTxInf = new CreditTransferTransactionInformation10();
    PaymentIdentification1 pmtId = new PaymentIdentification1();
    cdtTrfTxInf.setPmtId(pmtId);
    pmtId.setEndToEndId(getEndToEndId());
    AmountType3Choice amt = new AmountType3Choice();
    cdtTrfTxInf.setAmt(amt);
    ActiveOrHistoricCurrencyAndAmount instdAmt = new ActiveOrHistoricCurrencyAndAmount();
    amt.setInstdAmt(instdAmt);
    instdAmt.setCcy(getCurrency().getReference().trim());
    instdAmt.setValue(getAmount());
    BankAccount creditorBankAccount = this.getSellerBankAccount();
    cdtTrfTxInf.setCdtrAgt(PaymentBatch.agentFor(creditorBankAccount));
    cdtTrfTxInf.setCdtrAcct(PaymentBatch.cashAccountFor(creditorBankAccount));
    PartyIdentification32 cdtr = new PartyIdentification32();
    cdtTrfTxInf.setCdtr(cdtr);
    cdtr.setNm(getSeller().getName());
    PostalAddress6 pstlAdr = new PostalAddress6();
    cdtr.setPstlAdr(pstlAdr);
    pstlAdr.setCtry(PaymentBatch.ctryFor(getSeller()));
    RemittanceInformation5 rmtInf = new RemittanceInformation5();
    cdtTrfTxInf.setRmtInf(rmtInf);
    List<String> ustrdList = rmtInf.getUstrds();
    ustrdList.add(getRemittanceInformation());
    return cdtTrfTxInf;
}
Also used : AmountType3Choice(iso.std.iso._20022.tech.xsd.pain_001_001.AmountType3Choice) ActiveOrHistoricCurrencyAndAmount(iso.std.iso._20022.tech.xsd.pain_001_001.ActiveOrHistoricCurrencyAndAmount) RemittanceInformation5(iso.std.iso._20022.tech.xsd.pain_001_001.RemittanceInformation5) PaymentIdentification1(iso.std.iso._20022.tech.xsd.pain_001_001.PaymentIdentification1) CreditTransferTransactionInformation10(iso.std.iso._20022.tech.xsd.pain_001_001.CreditTransferTransactionInformation10) BankAccount(org.estatio.module.financial.dom.BankAccount) PostalAddress6(iso.std.iso._20022.tech.xsd.pain_001_001.PostalAddress6) PartyIdentification32(iso.std.iso._20022.tech.xsd.pain_001_001.PartyIdentification32) Programmatic(org.apache.isis.applib.annotation.Programmatic)

Aggregations

ActiveOrHistoricCurrencyAndAmount (iso.std.iso._20022.tech.xsd.pain_001_001.ActiveOrHistoricCurrencyAndAmount)1 AmountType3Choice (iso.std.iso._20022.tech.xsd.pain_001_001.AmountType3Choice)1 CreditTransferTransactionInformation10 (iso.std.iso._20022.tech.xsd.pain_001_001.CreditTransferTransactionInformation10)1 PartyIdentification32 (iso.std.iso._20022.tech.xsd.pain_001_001.PartyIdentification32)1 PaymentIdentification1 (iso.std.iso._20022.tech.xsd.pain_001_001.PaymentIdentification1)1 PostalAddress6 (iso.std.iso._20022.tech.xsd.pain_001_001.PostalAddress6)1 RemittanceInformation5 (iso.std.iso._20022.tech.xsd.pain_001_001.RemittanceInformation5)1 Programmatic (org.apache.isis.applib.annotation.Programmatic)1 BankAccount (org.estatio.module.financial.dom.BankAccount)1