Class SepaMessage
Abstract base class for all SEPA XML messages.
Inheritance
Inherited Members
Namespace: Subsembly.Sepa
Assembly: Subsembly.Sepa.dll
Syntax
public abstract class SepaMessage : SepaObject
Remarks
Currently a SepaDocument contains a single SEPA message which must be a
class derived from SepaMessage. Thus all instances derived from
SepaMessage will have IsMandatory set to
true
.
Constructors
SepaMessage(String, SepaMessageType)
Declaration
protected SepaMessage(string sMessageTagName, SepaMessageType nMessageType)
Parameters
Type | Name | Description |
---|---|---|
System.String | sMessageTagName | |
SepaMessageType | nMessageType |
Properties
CreationDateTime
The local date and time when the message was created.
Declaration
public DateTime CreationDateTime { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | By default this is initialized with the current local date and time. When setting this property any date and time may be given. |
IsEmpty
Declaration
public override bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
MessageIdentification
Unique identification of the message passed to the bank.
Declaration
public string MessageIdentification { get; set; }
Property Value
Type | Description |
---|---|
System.String | An arbitrary text with a maximum length of MaxIdLen (35) characters. By default this property is initialised with a suitable random identification string. |
Remarks
The character set must match CheckCharset(String).
Exceptions
Type | Condition |
---|---|
System.ArgumentException | An attempt was made to set a string longer than 35 characters, or a string that contains invalid characters. |
MessageName
Returns the MessageType as a string such as "pain.001" or "camt.052".
Declaration
public string MessageName { get; }
Property Value
Type | Description |
---|---|
System.String |
MessageType
Returns the fundamental type of this SEPA message.
Declaration
public SepaMessageType MessageType { get; }
Property Value
Type | Description |
---|---|
SepaMessageType |
Remarks
If the type is CreditTransferPaymentInitiation, then the message object is actually a SepaCreditTransferPaymentInitiation.
If the type is DirectDebitPaymentInitiation, then the message object is actually a SepaDirectDebitPaymentInitiation.
If the type is PaymentStatusReport, then the message object is actually a SepaPaymentStatusReport.
If the type is BankToCustomerAccountReport, then the message object is actually a SepaBankToCustomerAccountReport.
If the type is BankToCustomerStatement, then the message object is actually a SepaBankToCustomerStatement.
If the type is BankToCustomerDebitCreditNotification, then the message object is actually a SepaBankToCustomerDebitCreditNotification.
Methods
Clear()
Declaration
public override void Clear()
Overrides
OnValidate(ICollection<SepaException>, String)
Declaration
protected override void OnValidate(ICollection<SepaException> vErrors, string sPath)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<SepaException> | vErrors | |
System.String | sPath |
Overrides
ReadGroupHeaderFields(XmlReader, SepaMessageInfo)
Declaration
protected void ReadGroupHeaderFields(XmlReader aXmlReader, SepaMessageInfo aMessageInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | aXmlReader | |
SepaMessageInfo | aMessageInfo |
WriteGroupHeaderFields(XmlWriter, SepaMessageInfo)
Declaration
protected void WriteGroupHeaderFields(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | aXmlWriter | |
SepaMessageInfo | aMessageInfo |