diff --git a/iso20022-generator/generator-test/GeneratorTest.cs b/iso20022-generator/generator-test/GeneratorTest.cs index 4821c81..8b7ac6a 100644 --- a/iso20022-generator/generator-test/GeneratorTest.cs +++ b/iso20022-generator/generator-test/GeneratorTest.cs @@ -1,7 +1,9 @@ using System; +using System.Collections.Generic; using iso20022_generator; using iso20022_generator.entity; using iso20022_generator.entity.Transactions; +using iso20022_generator.schema; using Xunit; namespace generator_test @@ -44,7 +46,19 @@ public void InitGenerator() ReceiverIban = "CH26 0840 1016 9700 6070 6", ReferenceIdentification = "Reference Id for Receiver", InstructionForDebtorAgent = "Instruction", - UnstructuredRemittanceInformation = "Invoice Number 4399" + UnstructuredRemittanceInformation = "Invoice Number 4399", + InstructionsForCreditorAgent = new List { + new InstructionForCreditorAgent1() + { + InstrInf = "Line 1 of InstructionForCreditorAgent" + }, + new InstructionForCreditorAgent1() + { + Cd = Instruction3Code.CHQB, + CdSpecified = true, + InstrInf = "Line 2 of InstructionForCreditorAgent" + } + } //ReceiverBIC = "MIGRCHZZXXX" }); diff --git a/iso20022-generator/iso20022-generator/Pain001Generator.cs b/iso20022-generator/iso20022-generator/Pain001Generator.cs index 4ac8f6f..8a7cf96 100644 --- a/iso20022-generator/iso20022-generator/Pain001Generator.cs +++ b/iso20022-generator/iso20022-generator/Pain001Generator.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Text; using System.Xml; using System.Xml.Serialization; @@ -274,6 +275,13 @@ public void AddTransaction(PaymentInstructionInformation3CH pmtInf, Receiver rec cdtTrfTxInf.InstrForDbtrAgt = transaction.InstructionForDebtorAgent; // Index 2.85 } + // Index 2.81 InstrForCdtrAgt -> The element may only be used in consultation with the commissioned financial institution. + // This element may have different characteristics and instructions depending on the financial institution. + if (transaction.InstructionsForCreditorAgent?.Count > 0) + { + cdtTrfTxInf.InstrForCdtrAgt = transaction.InstructionsForCreditorAgent.ToArray(); + } + AddNewCreditTransferTransactionInformation(pmtInf, cdtTrfTxInf); } diff --git a/iso20022-generator/iso20022-generator/README.md b/iso20022-generator/iso20022-generator/README.md index 2515a78..45a6265 100644 --- a/iso20022-generator/iso20022-generator/README.md +++ b/iso20022-generator/iso20022-generator/README.md @@ -66,6 +66,10 @@ https://www.six-group.com/dam/download/banking-services/interbank-clearing/de/st | IBAN/QRR | 3 | TransactionIBANandQRR | | | IBAN/SCOR | 3 | TransactionIBANandSCOR | | +# Version Information +## 3.1.0 (2024-04-16) +- added XML tag InstrForCdtrAgt (Index 2.81). The element may only be used in consultation with the commissioned financial institution. This element may have different characteristics and instructions depending on the financial institution. + # Version Information ## 3.0.5 (2024-03-14) - changed minimum length of IBAN to 15 (Norway) diff --git a/iso20022-generator/iso20022-generator/entity/Transactions/TransactionBase.cs b/iso20022-generator/iso20022-generator/entity/Transactions/TransactionBase.cs index 39bf68c..fd61f73 100644 --- a/iso20022-generator/iso20022-generator/entity/Transactions/TransactionBase.cs +++ b/iso20022-generator/iso20022-generator/entity/Transactions/TransactionBase.cs @@ -1,4 +1,6 @@ using System; +using System.Collections.Generic; +using iso20022_generator.schema; namespace iso20022_generator.entity.Transactions { @@ -25,5 +27,7 @@ public string CurrencyCode public virtual string PaymentType => ""; public virtual string InstructionForDebtorAgent { get; set; } + + public virtual List InstructionsForCreditorAgent { get; set; } } } diff --git a/iso20022-generator/iso20022-generator/iso20022-generator.csproj b/iso20022-generator/iso20022-generator/iso20022-generator.csproj index 5f52975..70d6c32 100644 --- a/iso20022-generator/iso20022-generator/iso20022-generator.csproj +++ b/iso20022-generator/iso20022-generator/iso20022-generator.csproj @@ -10,11 +10,11 @@ iso20022Generator iso20022Generator - 3.0.5 + 3.1.0 enio AG This generator library helps you building iso 20022 artifacts with the minimum amount of information you need to set up valid documents. Currently pain.001 files are only supported. - 3.0.5.0 - 3.0.5.0 + 3.1.0.0 + 3.1.0.0 LICENSE.md README.md