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

    Class SepaAmount

    Inheritance
    System.Object
    SepaObject
    SepaAmount
    Inherited Members
    SepaObject.TagName
    SepaObject.IsMandatory
    SepaObject.WriteXml(XmlWriter, SepaMessageInfo)
    SepaObject.WriteXml(XmlWriter, SepaMessageInfo, String)
    SepaObject.ReadXml(XmlReader, SepaMessageInfo)
    SepaObject.ReadXml(XmlReader, SepaMessageInfo, String)
    SepaObject.IsValid
    SepaObject.Validate(ICollection<SepaException>, String)
    SepaObject.OnAfterXmlRead(SepaMessageInfo)
    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 SepaAmount : SepaObject

    Constructors

    SepaAmount()

    The default constructor creates an element with TagName "Amt", SepaAmountCreditDebitIndicatorConstraint Optional, and IsMandatory as false.

    Declaration
    public SepaAmount()

    SepaAmount(String, SepaAmountCreditDebitIndicatorConstraint)

    Declaration
    public SepaAmount(string sTagName, SepaAmountCreditDebitIndicatorConstraint nCdtDbtIndConstraint)
    Parameters
    Type Name Description
    System.String sTagName
    SepaAmountCreditDebitIndicatorConstraint nCdtDbtIndConstraint

    SepaAmount(String, SepaAmountCreditDebitIndicatorConstraint, Boolean)

    Declaration
    public SepaAmount(string sTagName, SepaAmountCreditDebitIndicatorConstraint nCdtDbtIndConstraint, bool fIsMandatory)
    Parameters
    Type Name Description
    System.String sTagName

    The XML tag that shall be used for writing the amount element. Usually this is "Amt", but can be different.

    SepaAmountCreditDebitIndicatorConstraint nCdtDbtIndConstraint

    Indicates whether the CreditDebitIndicator must be set to either Credit or Debit for a valid amount.

    System.Boolean fIsMandatory

    Fields

    CRDT

    The CreditDebitIndicatorCode for credits (positive amounts).

    Declaration
    public const string CRDT = "CRDT"
    Field Value
    Type Description
    System.String

    DBIT

    The CreditDebitIndicatorCode for debits (negative amounts).

    Declaration
    public const string DBIT = "DBIT"
    Field Value
    Type Description
    System.String

    Properties

    Amount

    The decimal amount.

    Declaration
    public decimal Amount { get; set; }
    Property Value
    Type Description
    System.Decimal

    For SEPA payments the value must be in the range from 0.00 through 999,999,999.99. The initial value is zero.

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    An attempt was made to set a negative value.

    CreditDebitIndicator

    Credit debit indicator of the amount.

    Declaration
    public SepaCreditDebitIndicator CreditDebitIndicator { get; set; }
    Property Value
    Type Description
    SepaCreditDebitIndicator
    Remarks

    The value Undefined indicates that no credit debit indicator was given. The initial value of this property is Undefined. Whenever this is set to either Credit or Debit, then a CdtDbtInd XML element will be written.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Is thrown if this method is invoked on an instance that does not support the CreditDebitIndicator.

    See Also
    SepaAmountCreditDebitIndicatorConstraint

    CreditDebitIndicatorCode

    Credit debit indicator as a four letter code string.

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

    This is "CRDT" for Credit, "DBIT" for Debit, or null for Undefined. Setting an empty string will also set the CreditDebitIndicator to Undefined.

    Exceptions
    Type Condition
    System.ArgumentException

    An attempt was made to set a string value that was neither "CRDT" nor "DBIT".

    System.InvalidOperationException

    Is thrown if this method is invoked on an instance that does not support the CreditDebitIndicator.

    See Also
    SepaAmountCreditDebitIndicatorConstraint

    Currency

    The currency code of the amount. According to the XSD the use of this attribute is required.

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

    The initial value of this property is null. It is possible to set this property to null if you want to just reset this amount.

    Exceptions
    Type Condition
    System.ArgumentException

    An attempt was made to set a value that is not a syntactically valid currency code.

    IsDebit

    Convenience property that indicates whether CreditDebitIndicator is Debit.

    Declaration
    public bool IsDebit { get; }
    Property Value
    Type Description
    System.Boolean

    IsEmpty

    Declaration
    public override bool IsEmpty { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    SepaObject.IsEmpty

    Value

    Provides the signed value of the amount.

    Declaration
    public decimal Value { get; }
    Property Value
    Type Description
    System.Decimal

    If the CreditDebitIndicator is Debit, then minus Amount is provided. In any other case simply the Amount is provided.

    Methods

    Clear()

    Declaration
    public override void Clear()
    Overrides
    SepaObject.Clear()

    Clone()

    Declaration
    public SepaAmount Clone()
    Returns
    Type Description
    SepaAmount

    OnReadObjectXml(XmlReader, SepaMessageInfo, String)

    Declaration
    protected override bool OnReadObjectXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo, string sTagName)
    Parameters
    Type Name Description
    System.Xml.XmlReader aXmlReader
    SepaMessageInfo aMessageInfo
    System.String sTagName
    Returns
    Type Description
    System.Boolean
    Overrides
    SepaObject.OnReadObjectXml(XmlReader, SepaMessageInfo, String)
    Exceptions
    Type Condition
    SepaException

    OnReadXml(XmlReader, SepaMessageInfo)

    Declaration
    protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo)
    Parameters
    Type Name Description
    System.Xml.XmlReader aXmlReader
    SepaMessageInfo aMessageInfo
    Overrides
    SepaObject.OnReadXml(XmlReader, SepaMessageInfo)
    Exceptions
    Type Condition
    System.NotImplementedException

    OnValidate(ICollection<SepaException>, String)

    Declaration
    protected override void OnValidate(ICollection<SepaException> vErrors, string sPath)
    Parameters
    Type Name Description
    System.Collections.Generic.ICollection<SepaException> vErrors
    System.String sPath
    Overrides
    SepaObject.OnValidate(ICollection<SepaException>, String)

    OnWriteObjectXml(XmlWriter, SepaMessageInfo, String)

    Declaration
    protected override void OnWriteObjectXml(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo, string sTagName)
    Parameters
    Type Name Description
    System.Xml.XmlWriter aXmlWriter
    SepaMessageInfo aMessageInfo
    System.String sTagName
    Overrides
    SepaObject.OnWriteObjectXml(XmlWriter, SepaMessageInfo, String)

    OnWriteXml(XmlWriter, SepaMessageInfo)

    Declaration
    protected override void OnWriteXml(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo)
    Parameters
    Type Name Description
    System.Xml.XmlWriter aXmlWriter
    SepaMessageInfo aMessageInfo
    Overrides
    SepaObject.OnWriteXml(XmlWriter, SepaMessageInfo)
    Exceptions
    Type Condition
    System.NotImplementedException

    SetValue(Decimal)

    Sets the Amount and CreditDebitIndicator from a signed decimal value.

    Declaration
    public void SetValue(decimal nValue)
    Parameters
    Type Name Description
    System.Decimal nValue

    Signed decimal value. The Amount will be set to the unsigned absolute amount of this value.

    Remarks

    If this instance does support the CreditDebitIndicator, then this method will update it according to the sign of the value. If the value is negative, then the CreditDebitIndicator will be set to Debit. If the value is zero or positive, then then the CreditDebitIndicator will be set to Credit.

    See Also
    SepaAmountCreditDebitIndicatorConstraint

    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