Class SepaCharges
An collection of SepaChargesRecord objects.
Implements
Inherited Members
Namespace: Subsembly.Sepa
Assembly: Subsembly.Sepa.dll
Syntax
public sealed class SepaCharges : SepaCollection<SepaChargesRecord>, IList<SepaChargesRecord>, ICollection<SepaChargesRecord>, IReadOnlyList<SepaChargesRecord>, IReadOnlyCollection<SepaChargesRecord>, IEnumerable<SepaChargesRecord>, IList, ICollection, IEnumerable
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
Declaration
public override bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
TotalChargesAndTaxAmount
The total charges and tax amount.
Declaration
public SepaAmount TotalChargesAndTaxAmount { get; }
Property Value
Type | Description |
---|---|
SepaAmount |
Methods
ClearItems()
Declaration
protected override void ClearItems()
Overrides
ReadXml(XmlReader, SepaMessageInfo)
Reads a single Chrgs
element and adds it to this collection.
Declaration
public void ReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo)
Parameters
Type | Name | Description |
---|---|---|
XmlReader | aXmlReader | |
SepaMessageInfo | aMessageInfo |
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)
Declaration
public override void Validate(ICollection<SepaException> vErrors, string sPath)
Parameters
Type | Name | Description |
---|---|---|
ICollection<SepaException> | vErrors | |
string | sPath |
Overrides
WriteXml(XmlWriter, SepaMessageInfo)
Declaration
public override void WriteXml(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo)
Parameters
Type | Name | Description |
---|---|---|
XmlWriter | aXmlWriter | |
SepaMessageInfo | aMessageInfo |