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

    Class SwiftStatement

    Repesents and manages SWIFT MT-940 Customer Statement messages.

    Inheritance
    System.Object
    Swift9xxBase
    SwiftStatement
    Implements
    System.Collections.IEnumerable
    System.IComparable
    Inherited Members
    Swift9xxBase.MT
    Swift9xxBase.TransactionReference
    Swift9xxBase.RelatedReference
    Swift9xxBase.AccountIdentification
    Swift9xxBase.Account
    Swift9xxBase.AccountIBAN
    Swift9xxBase.AccountBIC
    Swift9xxBase.AccountBankCode
    Swift9xxBase.AccountNumber
    Swift9xxBase.AccountCurrency
    Swift9xxBase.StatementNumber
    Swift9xxBase.SequenceNumber
    Swift9xxBase.StatementLines
    Swift9xxBase.Count
    Swift9xxBase.GetStatementLine(Int32)
    Swift9xxBase.Insert(SwiftStatementLine)
    Swift9xxBase.GetEnumerator()
    Swift9xxBase.CompareTo(Object)
    Swift9xxBase.ReadMessage(SwiftStatementReader)
    Swift9xxBase.ReadAllMessages(SwiftStatementReader, Int32)
    Swift9xxBase.ReadAllMessages(TextReader, Int32)
    Swift9xxBase.ReadAllMessages(Stream, Int32)
    Swift9xxBase.ReadAllMessages(String, Int32)
    Swift9xxBase.WriteProlog(SwiftWriter)
    Swift9xxBase.WriteStatementLines(SwiftWriter)
    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 sealed class SwiftStatement : Swift9xxBase, IEnumerable, IComparable
    Remarks

    The SWIFT fields are read into the properties of the new SwiftStatement instance as follows:

    20Field content will be placed into TransactionReference property.
    21Field content will be placed into RelatedReference property. If no field 21 appears, then the RelatedReference property will be null.
    25Field content will be placed into AccountIdentification property.
    28CSubfields will be placed into StatementNumber and SequenceNumber properties. If no sequence number subfield exists, then the SequenceNumber will be zero.
    60a Regardless of the actual field type, this will be stored in the OpeningBalance property.
    61 and 86All these fields are collected as new SwiftStatementLine instances, added to the StatementLines collection.
    62a Regardless of the actual field type, this will be stored in the ClosingBalance property.
    64If present it will be placed into the ClosingAvailableBalance property. If not, then that property will be null.
    65All occurences of this field will be added to the ForwardAvailableBalances collection.
    86If present it will be placed into the InfoToAccountOwner property. If not, then that property will be null.

    Constructors

    SwiftStatement()

    Default constructor.

    Declaration
    public SwiftStatement()
    Remarks

    This should only be used when subsequently reading the statement data from a stream or file.

    SwiftStatement(String, SwiftBalance)

    Constructs a new SwiftStatement from scratch.

    Declaration
    public SwiftStatement(string sAccountIdentification, SwiftBalance aOpeningBalance)
    Parameters
    Type Name Description
    System.String sAccountIdentification

    The account identification for which to create the new statement.

    SwiftBalance aOpeningBalance

    The opening balance of the the new statement. This implicitly defines the starting date of the statement period and the currency of the account.

    Remarks

    The newly created SwiftStatement is completely initialised from the given parameters and thus can immediately be written as a MT-940, albeit without any statement lines in it.

    The TransactionReference is preset with the string "STARTUMS". However it can be changed at any time.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Either argument was null.

    Properties

    ClosingAvailableBalance

    Funds which are available to the account owner (if credit balance) or the balance which is subject to interest charges (if debit balance).

    Declaration
    public SwiftBalance ClosingAvailableBalance { get; set; }
    Property Value
    Type Description
    SwiftBalance

    ClosingBalance

    The closing balance of this statement.

    Declaration
    public SwiftBalance ClosingBalance { get; set; }
    Property Value
    Type Description
    SwiftBalance

    The ClosingBalance is never null. Its Time component is not set and will always be completely ignored.

    The SwiftBalance instance provided by this property must only be read and must not be modified.

    CreationDate

    Declaration
    protected override DateTime CreationDate { get; }
    Property Value
    Type Description
    System.DateTime
    Overrides
    Swift9xxBase.CreationDate

    ForwardAvailableBalances

    Funds which are available to the account owner (if a credit or debit balance) for the specified forward value date.

    Declaration
    public IList ForwardAvailableBalances { get; }
    Property Value
    Type Description
    System.Collections.IList

    InfoToAccountOwner

    Additional information on the message as a whole to be passed on to the account owner.

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

    The InfoToAccountOwner property corresponds with the final field 86 of a SWIFT MT-940 message which does not correspond to a particular statement line, but to the message as a whole. This field may contain up to six lines of text with up to 65 characters each.

    OpeningBalance

    The opening balance of this statement.

    Declaration
    public SwiftBalance OpeningBalance { get; set; }
    Property Value
    Type Description
    SwiftBalance

    The OpeningBalance is never null. Its Time component is not set and will always be completely ignored.

    The SwiftBalance instance provided by this property must only be read and must not be modified.

    Remarks

    In addition to just the balance value, the OpeningBalance property provides much more information about this statement. Most of all it provides the date where this statement begins. In addition it defines the initial account currency.

    Methods

    AddStatementLine(SwiftStatementLine)

    Inserts a statement line into this statement.

    Declaration
    public override void AddStatementLine(SwiftStatementLine aStatementLine)
    Parameters
    Type Name Description
    SwiftStatementLine aStatementLine

    Statement line to be inserted. This must have an EntryDate set.

    Overrides
    Swift9xxBase.AddStatementLine(SwiftStatementLine)
    Remarks

    If the inserted statement contains an entry date that is before the date of the opening balance, then the opening balance is recomputed by subtracting the amount of the statement line. The date of the opening balance is changed to the entry date of the statement line.

    Otherwise the closing balance is recomputed by adding the amount of the statement line. If the entry date of the inserted statement line is after the closing balance date, then the closing balance date is updated.

    If the opening balance (or closing balance) is null, no computations are done.

    ParseField(SwiftStatementReaderState, SwiftField)

    Declaration
    protected override void ParseField(SwiftStatementReaderState nState, SwiftField aField)
    Parameters
    Type Name Description
    SwiftStatementReaderState nState
    SwiftField aField
    Overrides
    Swift9xxBase.ParseField(SwiftStatementReaderState, SwiftField)

    WriteMT940(SwiftWriter)

    Writes this complete SwiftStatement instance as a SWIFT MT-940 message.

    Declaration
    public void WriteMT940(SwiftWriter aSwiftWriter)
    Parameters
    Type Name Description
    SwiftWriter aSwiftWriter

    Destination to write the SWIFT MT-940 message to.

    WriteMT940(Stream)

    Writes this complete SwiftStatement instance as a SWIFT MT-940 message.

    Declaration
    public void WriteMT940(Stream aStream)
    Parameters
    Type Name Description
    System.IO.Stream aStream

    Output stream to write the SWIFT MT-940 message to. This stream will not be closed by this method.

    Implements

    System.Collections.IEnumerable
    System.IComparable
    In This Article
    Back to top Copyright 2009-2025 Subsembly GmbH