Class SepaCharges

Namespace
Subsembly.Sepa
Assembly
Subsembly.Sepa.dll

An collection of SepaChargesRecord objects.

public sealed class SepaCharges : SepaCollection<SepaChargesRecord>, IList<SepaChargesRecord>, ICollection<SepaChargesRecord>, IReadOnlyList<SepaChargesRecord>, IReadOnlyCollection<SepaChargesRecord>, IEnumerable<SepaChargesRecord>, IList, ICollection, IEnumerable
Inheritance
SepaCharges
Implements
Inherited Members

Remarks

A Charges collection is somewhat special because it has different representations in different CAMT versions. In CAMT version 03 or older there is a sequence of Chrgs elements. Starting with CAMT version 04, there is always a single Chrgs element that contains an optional sequence of Rcrd elements. This class is modeled attempting to handle both variations. It uses a collection of SepaChargesRecord objects, even if the data is actually persisted as a sequence of Chrgs elements.

When writing this collection the actual format depends on the SepaMessageInfo used to write the object. If the indicated CAMT format is version 03 or older, then a sequence of old-style Chrgs elements is written. If the CAMT format is version 04 or newer, then a single Chrgs element, containing a sequence of Rcrd elements is written.

Properties

IsEmpty

public override bool IsEmpty { get; }

Property Value

bool

TotalChargesAndTaxAmount

The total charges and tax amount.

public SepaAmount TotalChargesAndTaxAmount { get; }

Property Value

SepaAmount

Methods

ClearItems()

protected override void ClearItems()

ReadXml(XmlReader, SepaMessageInfo)

Reads a single Chrgs element and adds it to this collection.

public void ReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo)

Parameters

aXmlReader XmlReader
aMessageInfo SepaMessageInfo

Remarks

If this is a CAMT version 04 (or newer) format Chrgs element, then this will read all contained Rcrd elements and add them to this collection. If this is an old CAMT version 03 (or older) format Chrgs element, then a single SepaChargesRecord will be created and added to this collection. It is used to hold the data of that single Chrgs element.

Validate(ICollection<SepaException>, string)

public override void Validate(ICollection<SepaException> vErrors, string sPath)

Parameters

vErrors ICollection<SepaException>
sPath string

WriteXml(XmlWriter, SepaMessageInfo)

public override void WriteXml(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo)

Parameters

aXmlWriter XmlWriter
aMessageInfo SepaMessageInfo