Class SwiftMX
Utility methods that convert old SWIFT MT-940 and SWIFT MT-942 messages to ISO 20022 CAMT statements and vice versa.
Inheritance
Inherited Members
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 | The CAMT statement to be converted to a SWIFT statement. If this is |
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.
|
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 |
Returns
Type | Description |
---|---|
SepaStatement | A new SepaStatement with TagName
"Stmt" produced from the given SwiftStatement. If the parameter
|
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. |