• API Overview
  • EBICS API
  • FinTS API
  • XS2A API
  • SEPA API
Search Results for

    Class SepaMessageInfo

    Describes the details of a particular SEPA message variant.

    Inheritance
    System.Object
    SepaMessageInfo
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Subsembly.Sepa
    Assembly: Subsembly.Sepa.dll
    Syntax
    public sealed class SepaMessageInfo
    Remarks

    At a minimum there are the properties MessageType, Version, and MessageTag which generically describe the message type. These basic properties are set in the object constructor and cannot be changed thereafter.

    For special variants of SEPA messages, the optional properties XmlNamespace and XmlSchemaLocation provide further information about the variant. These properties can be changed after the object has been created.

    Constructors

    SepaMessageInfo(SepaMessageInfo)

    Creates a new SepaMessageInfo object as a copy of another one.

    Declaration
    public SepaMessageInfo(SepaMessageInfo aMessageInfo)
    Parameters
    Type Name Description
    SepaMessageInfo aMessageInfo

    SepaMessageInfo to copy. Must not be null.

    Exceptions
    Type Condition
    System.ArgumentNullException

    The aMessageInfo parameter was null.

    SepaMessageInfo(SepaMessageType, Int32)

    Creates a new generic SepaMessageInfo object for a given message type and version.

    Declaration
    public SepaMessageInfo(SepaMessageType nMessageType, int nVersion)
    Parameters
    Type Name Description
    SepaMessageType nMessageType

    The fundamental SEPA message type.

    System.Int32 nVersion

    The SEPA message version number. This usually corresponds with the last two digits of a payment initiation name. For example, given the message specification "pain.001.002.03", the version number would be 3. The value must not be 0 or negative.

    Exceptions
    Type Condition
    System.ArgumentException

    The parameter nVersion was less than 1 or the parameter nMessageType was invalid.

    SepaMessageInfo(SepaMessageType, Int32, String, String, String)

    Creates a fully specified new SepaMessageInfo object.

    Declaration
    public SepaMessageInfo(SepaMessageType nMessageType, int nVersion, string sMessageTag, string sXmlNamespace, string sXmlSchemaLocation)
    Parameters
    Type Name Description
    SepaMessageType nMessageType

    The fundamental SEPA message type.

    System.Int32 nVersion

    The SEPA message version number. This usually corresponds with the last two digits of a payment initiataion name. For example, given the message specification "pain.001.002.03", the version number would be 3. The value must not be 0 or negative.

    System.String sMessageTag

    The mandatory SEPA message (XML) tag. Note that the correct message tag that must be used is usually predetermined by the message type and version.

    System.String sXmlNamespace

    The optional XML namespace. This may be an empty string in order to signify the unnamed default namespace. This may be null if the XML namespace shall not be specified at this time.

    System.String sXmlSchemaLocation

    The optional XML schema location. This may be null if the XML schema location shall not be specified. If a schema location is given, then the XML namespace must also be specified.

    Exceptions
    Type Condition
    System.ArgumentNullException

    The sMessageTag parameter was null.

    System.ArgumentException

    The parameter nVersion was less than 1, or the parameter sMessageTag was not a valid XML tag name.

    SepaMessageInfo(String)

    Creates a new SepaMessageInfo object for a message based on a given XML namespace.

    Declaration
    public SepaMessageInfo(string sXmlNamespace)
    Parameters
    Type Name Description
    System.String sXmlNamespace

    The XML namespace based on which a new message shall be created. This must not be null. The SepaMessageType, and the message version are all derived from that given namespace name. This must be a well known namespace, or it must contain an embedded message type identifier, such as "camt.052.001.08" or "pain.001.001.03".

    Exceptions
    Type Condition
    System.ArgumentException

    It was not possible to create a message based on the given namespace name. This is probably due to an unknown or malformed namespace name.

    Properties

    MessageTag

    The SEPA message XML tag.

    Declaration
    public string MessageTag { get; }
    Property Value
    Type Description
    System.String

    MessageType

    The fundamental SEPA message type.

    Declaration
    public SepaMessageType MessageType { get; }
    Property Value
    Type Description
    SepaMessageType

    PainIdentifier

    The SEPA message identifier.

    Declaration
    public string PainIdentifier { get; }
    Property Value
    Type Description
    System.String
    Remarks

    This returns a string in the format "pain.000.000.00" which identifies the SEPA message type and version. If a XmlNamespace was set, then it is used in an attempt to determine the exact message variant.

    If this message info does not describe a Pain message, then null is returned.

    Version

    The SEPA message version.

    Declaration
    public int Version { get; }
    Property Value
    Type Description
    System.Int32
    Remarks

    This usually corresponds with the last two digits of a payment initiataion name. For example, given the message specification "pain.001.002.03", the version number would be 3. The value must not be 0 or negative.

    WellKnownMessage

    If created via Create(SepaWellKnownMessageInfos), then this is the SepaWellKnownMessageInfos value that used for creating this instance.

    Declaration
    public SepaWellKnownMessageInfos WellKnownMessage { get; }
    Property Value
    Type Description
    SepaWellKnownMessageInfos

    XmlNamespace

    The SEPA message XML namespace URN.

    Declaration
    public string XmlNamespace { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This may be an empty string to signify the unnamed default namespace. This may be null for a generic SEPA message information.

    XmlSchemaLocation

    The SEPA message XML schema location.

    Declaration
    public string XmlSchemaLocation { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This may be null if the schema location was not included in a parsed message, or should not be included in a generated message.

    Methods

    Clone()

    Creates a copy of this SepaMessageInfo object.

    Declaration
    public SepaMessageInfo Clone()
    Returns
    Type Description
    SepaMessageInfo

    A copy of this SepaMessageInfo object.

    Create(SepaWellKnownMessageInfos)

    Creates a SepaMessageInfo object for a well known message variant.

    Declaration
    public static SepaMessageInfo Create(SepaWellKnownMessageInfos nWellKnownMessage)
    Parameters
    Type Name Description
    SepaWellKnownMessageInfos nWellKnownMessage

    The well known message variant for which to create a new SepaMessageInfo object.

    Returns
    Type Description
    SepaMessageInfo
    Exceptions
    Type Condition
    System.ArgumentException

    The given parameter nWellKnownMessage had an unknown value.

    Create(String, String)

    Creates a SepaMessageInfo object for a particular SEPA message tag.

    Declaration
    public static SepaMessageInfo Create(string sMessageTag, string sXmlNamespace)
    Parameters
    Type Name Description
    System.String sMessageTag

    The XML message tag for which a SepaMessageInfo object shall be created. Currently this must be one of "CstmrCdtTrfInitn", "CstmrDrctDbtInitn", "CstmrPmtStsRpt", "BkToCstmrAcctRpt", "BkToCstmrStmt", or "BkToCstmrDbtCdtNtfctn". For any unknown message tag this method will return null.

    System.String sXmlNamespace

    The XML namespace URN from the XML document.

    Returns
    Type Description
    SepaMessageInfo

    A new SepaMessageInfo object which describes a SEPA message with the given message tag or null.

    GetAllWellKnownMessageInfos(SepaMessageType)

    Get the SepaMessageInfo for all SepaWellKnownMessageInfos that are supported by this implementation.

    Declaration
    public static SepaMessageInfo[] GetAllWellKnownMessageInfos(SepaMessageType nMessageType)
    Parameters
    Type Name Description
    SepaMessageType nMessageType
    Returns
    Type Description
    SepaMessageInfo[]
    Exceptions
    Type Condition
    System.ArgumentException

    The given nMessageType was Null, or an undefined enumeration value.

    GetAllWellKnownMessageInfos(SepaMessageType, String)

    Get the SepaMessageInfo for all SepaWellKnownMessageInfos for a particular country that are supported by this implementation.

    Declaration
    public static SepaMessageInfo[] GetAllWellKnownMessageInfos(SepaMessageType nMessageType, string sCountryCode)
    Parameters
    Type Name Description
    SepaMessageType nMessageType
    System.String sCountryCode

    Optional country code which limits the returned message infos to only those that have been specified by that specific country. If this is null, then really all known message infos are returned.

    Returns
    Type Description
    SepaMessageInfo[]

    Always returns a non-null array of newly created SepaMessageInfo instances. The returned array may be empty, if a sCountryCode was provided for which there are no message infos known.

    Exceptions
    Type Condition
    System.ArgumentException

    The given nMessageType was Null, or an undefined enumeration value.

    GetAustrianWellKnownMessageInfo(String)

    Declaration
    public static SepaWellKnownMessageInfos GetAustrianWellKnownMessageInfo(string sMessageFormat)
    Parameters
    Type Name Description
    System.String sMessageFormat
    Returns
    Type Description
    SepaWellKnownMessageInfos

    GetCountryCode(SepaWellKnownMessageInfos)

    Declaration
    public static string GetCountryCode(SepaWellKnownMessageInfos nWellKnownMessage)
    Parameters
    Type Name Description
    SepaWellKnownMessageInfos nWellKnownMessage
    Returns
    Type Description
    System.String

    Returns the country code of the country that specified the particular well known message info, or null, if it was a generic or internationally specified message.

    GetMessageTag(SepaMessageType)

    Get the XML message tag that shall be used for the given message type.

    Declaration
    public static string GetMessageTag(SepaMessageType nMessageType)
    Parameters
    Type Name Description
    SepaMessageType nMessageType
    Returns
    Type Description
    System.String
    Remarks

    This method only returns the current message tags. It never returns the obsolete "pain.001.001.02" or "pain.008.001.01" message tags.

    Exceptions
    Type Condition
    System.ArgumentException

    The given nMessageType was Null, or an undefined enumeration value.

    GetNamespace(SepaWellKnownMessageInfos)

    Gets the XML namespace URN for a particular well known SEPA message variant.

    Declaration
    public static string GetNamespace(SepaWellKnownMessageInfos nWellKnownMessage)
    Parameters
    Type Name Description
    SepaWellKnownMessageInfos nWellKnownMessage

    The SEPA message variant for which to get the XML namespace URN.

    Returns
    Type Description
    System.String

    Returns the XML namespace URN, or an empty string if it is a generic message variant, or null if the given message variant is not known.

    GetSwissWellKnownMessageInfo(String)

    Declaration
    public static SepaWellKnownMessageInfos GetSwissWellKnownMessageInfo(string sMessageFormat)
    Parameters
    Type Name Description
    System.String sMessageFormat
    Returns
    Type Description
    SepaWellKnownMessageInfos

    GetZkaWellKnownMessageInfo(String)

    Returns the ZKA defined message for a given message format.

    Declaration
    public static SepaWellKnownMessageInfos GetZkaWellKnownMessageInfo(string sMessageFormat)
    Parameters
    Type Name Description
    System.String sMessageFormat

    A message format string in the format "pain.000.000.00", or "camt.000.000.00".

    Returns
    Type Description
    SepaWellKnownMessageInfos

    If the message format is known, then the corresponding well known ZKA format is returned. If the message format is not known, then Null is returned.

    NewMessage()

    Creates a new SepaMessage object with the given SEPA message type.

    Declaration
    public SepaMessage NewMessage()
    Returns
    Type Description
    SepaMessage

    A new SepaMessage object.

    Exceptions
    Type Condition
    System.NotSupportedException

    There is no implementation available for this MessageType.

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()
    In This Article
    Back to top Copyright 2009-2025 Subsembly GmbH