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

    Class FinAcct

    Collects information about a financial account.

    Inheritance
    System.Object
    FinPersist
    FinAcct
    Inherited Members
    FinPersist.RootTag
    FinPersist.SaveAs(String)
    FinPersist.Load(String)
    FinPersist.Write(Stream)
    FinPersist.Read(Stream)
    FinPersist.SaveXml()
    FinPersist.SaveXml(String)
    FinPersist.LoadXml(String)
    FinPersist.ToXml(String)
    FinPersist.WriteXmlDocument(XmlWriter)
    FinPersist.WriteXmlDocument(XmlWriter, String)
    FinPersist.ReadXmlDocument(XmlReader)
    FinPersist.WriteXmlElement(XmlWriter, String, String)
    FinPersist.WriteXmlElementInt(XmlWriter, String, Int32)
    FinPersist.WriteXmlElementBool(XmlWriter, String, Boolean)
    FinPersist.WriteXmlElementDate(XmlWriter, String, SwiftDate)
    FinPersist.WriteXmlElementTime(XmlWriter, String, SwiftTime)
    FinPersist.WriteXmlElementAmt(XmlWriter, String, SwiftAmt)
    FinPersist.WriteXmlElementAcct(XmlWriter, String, FinAcct)
    FinPersist.WriteXmlElementSegment(XmlWriter, String, FinSegment)
    FinPersist.ReadXmlElement(XmlReader, String)
    FinPersist.ReadXmlElementInt(XmlReader, String)
    FinPersist.ReadXmlElementBool(XmlReader, String)
    FinPersist.ReadXmlElementDate(XmlReader, String)
    FinPersist.ReadXmlElementTime(XmlReader, String)
    FinPersist.ReadXmlElementAmt(XmlReader, String)
    FinPersist.ReadXmlElementAcct(XmlReader, String)
    FinPersist.ReadXmlElementSegment(XmlReader, String)
    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.FinTS
    Assembly: Subsembly.FinTS.Core.dll
    Syntax
    public class FinAcct : FinPersist
    Remarks

    The minimal information required to uniquely identify an account is a three digit ISO 3166 numeric country code (stored in CountryCode), the account number (stored in AcctNo), and sometimes the country specific bank code (stored in BankCode).

    A german account is represented an account number with up to 10 digits, the ISO country code 280 and the bank sort code (Bankleitzahl) as the bank code. Optionally a bank may add an arbitrary subaccount characteristic.

    Constructors

    FinAcct()

    Constructs a FinAcct instance with default values.

    Declaration
    public FinAcct()
    Remarks

    By default the CountryCode is set to "280" (Germany) and the Currency code is set to "EUR". All other properties will have a null value.

    FinAcct(String, String)

    Constructs a FinAcct instance with the given properties.

    Declaration
    public FinAcct(string sAcctNo, string sBankCode)
    Parameters
    Type Name Description
    System.String sAcctNo

    The account number as a string with up to 30 characters.

    System.String sBankCode

    The bank code as a string with up to 30 characters.

    Remarks

    In addition to the given parameters the CountryCode is set to "280" (Germany) and the Currency code is set to "EUR". All remaning properties will have a null value.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    If any of the arguments is outside the allowed range, then an ArgumentOutOfRangeException will be thrown.

    FinAcct(String, String, String)

    Constructs a FinAcct instance with the given properties.

    Declaration
    public FinAcct(string sAcctNo, string sCountryCode, string sBankCode)
    Parameters
    Type Name Description
    System.String sAcctNo

    The account number as a string with up to 30 characters.

    System.String sCountryCode

    The country code as a string with three digits.

    System.String sBankCode

    The bank code as a string with up to 30 characters.

    Remarks

    In addition to the given parameters the Currency code is set to "EUR". All remaning properties will have a null value.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    If any of the arguments is outside the allowed range, then an ArgumentOutOfRangeException will be thrown.

    Properties

    AcctNo

    The account number of this account record.

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

    The account number is a required property and must hold a string of up to 30 characters. This property is never an empty string but may be null. No validation about the character set or content of a given account number string is made.

    Remarks

    Actually this field now accepts a string length of up to 34 characters in order to match the maximum length of an account number returned in MT-940 data. However, sending an account number longer than 30 characters in a HBCI segment will always fail.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    An attempt to set the account number to a string longer than 30 characters will cause an ArgumentOutOfRangeException to be thrown.

    BankCode

    The optional bank code of this account.

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

    The bank code is an optional property and can hold a string of up to 30 characters or be null.

    Remarks

    Although, internationally speaking, the bank code is optional, it is a required property for many nations, such as germany.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    An attempt to set the bank code to a string longer than 30 characters will cause an ArgumentOutOfRangeException to be thrown.

    BIC

    Optional BIC.

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

    CountryCode

    The ISO 3166 numeric country code of this account record.

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

    The country code is a required property and must hold a string of three digits. Although it contains only digits, it is represented as a string, because it may have leding zeroes that must not get lost.

    Remarks

    No validation is made whether the country code actually exists. Thus any three digit string may be passed.

    Although the correct ISO 3166 country code for germany would be 276, the code actually used by FinTS is 280.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    An attempt to set the country code to a string that does not contain three digits will cause an ArgumentOutOfRangeException to be thrown.

    Currency

    Optional ISO 4217 alpha currency code of this account.

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

    An ISO 4217 alpha currency code consists of three upper case letters.

    Remarks

    Generally all real life accounts have a currency. In FinTS however, the currency code is optional and may be absent for portfolio accounts.

    No validation is made whether the currency code actually exists. Thus any string of three upper case letters and digits may be passed.

    Exceptions
    Type Condition
    System.ArgumentException

    An attempt to set the currency code to a string that does not contain three upper case letters or digits will cause an ArgumentException to be thrown.

    FromUPD

    Optional reference to the HIUPD segment that this instance was constructed from.

    Declaration
    public FinAcctInfo FromUPD { get; }
    Property Value
    Type Description
    FinAcctInfo
    Remarks

    This property is non-null for all instances that were created from the UPD and are returned through the FinAcctInfo.Acct property.

    For instances where this property is not null, all other properties are read-only and cannot be changed. Any attempt to change other properties in this case will produce an immediate IllegalOperationException.

    HolderName

    Optional account holder name.

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

    IBAN

    Optional International Bank Account Number (IBAN) of this account.

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

    SubAcctCharacteristic

    The optional subaccount characteristic of this account record.

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

    The subaccount characteristic is an optional property and can hold a string of up to 30 characters or be null.

    Remarks

    A subaccount characteristic is some FinTS protocol specific account identification string that is usually of no meaning to and not known by the account holder. It is solely obtained from the account information in the user parameter data.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    An attempt to set the subaccount characteristic to a string longer than 30 characters will cause an ArgumentOutOfRangeException to be thrown.

    Methods

    Clear()

    Clear all properties.

    Declaration
    public void Clear()
    Remarks

    This will reset all properties to null values, including the currency and the country code.

    Clone()

    Returns a copy of this FinAcct instance.

    Declaration
    public FinAcct Clone()
    Returns
    Type Description
    FinAcct
    Remarks

    The FromUPD property of the returned clone will always be false.

    ReadXml(XmlReader)

    Reads an FinTS 4.0 account specification XML.

    Declaration
    public override void ReadXml(XmlReader aXmlReader)
    Parameters
    Type Name Description
    System.Xml.XmlReader aXmlReader
    Overrides
    FinPersist.ReadXml(XmlReader)
    Remarks

    This method does not expect a root element. It only reads the sequence of elements from <AcctNo> through <BankID>. Only elements that are found will replace the current value of the corresponding fields. Other fields remain untouched.

    Exceptions
    Type Condition
    System.ArgumentNullException

    The parameter aXmlReader was null.

    WriteXml(XmlWriter)

    Writes the account data as a FinTS 4.0 XML formatted account specification.

    Declaration
    public override void WriteXml(XmlWriter aXmlWriter)
    Parameters
    Type Name Description
    System.Xml.XmlWriter aXmlWriter
    Overrides
    FinPersist.WriteXml(XmlWriter)
    Remarks

    This method does not write a root element. It only writes the elements <IBAN> through <BankID>. Any null fields will be omitted from the output. Empty strings are written as empty XML elements. The properties Currency and HolderName are not persisted.

    Exceptions
    Type Condition
    System.ArgumentNullException

    The parameter aXmlWriter was null.

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