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

    Class SwiftMX

    Utility methods that convert old SWIFT MT-940 and SWIFT MT-942 messages to ISO 20022 CAMT statements and vice versa.

    Inheritance
    System.Object
    SwiftMX
    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)
    System.Object.ToString()
    Namespace: Subsembly.Swift
    Assembly: Subsembly.Sepa.dll
    Syntax
    public static class SwiftMX

    Methods

    Convert(SepaDocument, List<SwiftStatement>)

    Convert CAMT.053 Sepa document to one or more SWIFT MT-940 statements

    Declaration
    public static bool Convert(SepaDocument aSepaDocument, List<SwiftStatement> vSwiftStatements)
    Parameters
    Type Name Description
    SepaDocument aSepaDocument
    System.Collections.Generic.List<SwiftStatement> vSwiftStatements
    Returns
    Type Description
    System.Boolean

    Convert(SepaStatement)

    Convert CAMT.053 or CAMT.052 statement to SWIFT MT-940 or MT-942 statement.

    Declaration
    public static Swift9xxBase Convert(SepaStatement aSepaStatement)
    Parameters
    Type Name Description
    SepaStatement aSepaStatement
    Returns
    Type Description
    Swift9xxBase

    Convert(SepaStatement, Int32)

    Convert CAMT.053 or CAMT.052 statement to SWIFT MT-940 or MT-942 statement.

    Declaration
    public static Swift9xxBase Convert(SepaStatement aSepaStatement, int nMT)
    Parameters
    Type Name Description
    SepaStatement aSepaStatement

    The CAMT statement to be converted to a SWIFT statement. If this is null, then null will be returned.

    System.Int32 nMT

    Selects the target SWIFT MT format that shall be created. If this is zero, then the target SWIFT MT format is derived from the aSepaStatement. Alternatively, the values 940 or 942 may be used to select a particular target SWIFT MT format.

    Returns
    Type Description
    Swift9xxBase

    Either an instance of SwiftStatement or SwiftInterimTransRept, depending on the TagName of the SepaStatement that was provided. The tag name "Stmt" will produce a SwiftStatement, the tag name "Rpt" will produce a SwiftInterimTransRept.

    Exceptions
    Type Condition
    System.ArgumentException

    The TagName of the SepaStatement was neither "Stmt", nor "Rpt".

    SwiftException

    A SwiftException with Code CannotConvert may be thrown if the given CANT statement could not be converted for various reasons.

    • The ElectronicSequenceNumber is too big to be represented in a valid SWIFT statement.
    • The statement is of type "Stmt" and does not contain an opening or closing balance.

    Convert(SwiftInterimTransRept)

    Converts a single SWIFT MT-942 transaction report to a CAMT statement.

    Declaration
    public static SepaStatement Convert(SwiftInterimTransRept aSwiftStatement)
    Parameters
    Type Name Description
    SwiftInterimTransRept aSwiftStatement
    Returns
    Type Description
    SepaStatement

    Convert(SwiftStatement)

    Converts a single SWIFT MT-940 statement to a CAMT statement.

    Declaration
    public static SepaStatement Convert(SwiftStatement aSwiftStatement)
    Parameters
    Type Name Description
    SwiftStatement aSwiftStatement

    The SwiftStatement to be converted, or null.

    Returns
    Type Description
    SepaStatement

    A new SepaStatement with TagName "Stmt" produced from the given SwiftStatement. If the parameter aSwiftStatement was null, then this method does return null.

    Remarks

    If the SWIFT statement does not contain a ClosingBalance then a SwiftException is thrown.

    The account currency is determined from the ClosingBalance. If the closing balance does not contain a currency, or the OpeningBalance contains a different currency, then a SwiftException is thrown.

    Exceptions
    Type Condition
    SwiftException

    A SwiftException with Code CannotConvert is thrown, when the given statement cannot be converted.

    In This Article
    Back to top Copyright 2009-2025 Subsembly GmbH